home *** CD-ROM | disk | FTP | other *** search
/ LSD Docs / LSD Docs.iso / FILEZ / lsd30.dms / lsd30.adf / cando1.doc.pp / cando1.doc
Text File  |  1978-11-19  |  159KB  |  3,773 lines

  1.                           "The CanDo HowTo Book!"
  2.  
  3.  The CanDo Manual is computerized by SoftWare House RobbiSoft Dec.90'/Jan.91'
  4.  
  5. What's in the CanDo HowTo Book?:
  6.  
  7. Chapter 1    What Does CanDO Do?                Page.
  8.  
  9.     CanDo Overwiew ................................................1-1
  10.  
  11.     Whatzinabox? ..................................................1-1
  12.  
  13.     CanDo System Requirements .....................................1-1
  14.  
  15.     You CanDo a Backup ............................................1-2
  16.  
  17.     CanDo on a Hard Disk or Floppy Disk ...........................1-2
  18.  
  19.     A couple of questions you might have ..........................1-3
  20.  
  21.  
  22. Chapter 2    You CanDo It.
  23.  
  24.     Starting Cando ................................................2-1
  25.  
  26.     You CanDo an Application ......................................2-1
  27.  
  28.     Lets Do It ....................................................2-1
  29.  
  30.     First Project .................................................2-2
  31.  
  32.     Second Project ................................................2-9
  33.  
  34.  
  35.                                       1
  36.  
  37. Chapter 3    Decks & Cards.
  38.  
  39.     Decks & Cards Overwiev ........................................3-1
  40.  
  41.     Menus .........................................................3-1
  42.  
  43.     Deck Menu .....................................................3-2
  44.  
  45.     Card Menu .....................................................3-2
  46.  
  47.     Mics. Menu ....................................................3-3
  48.  
  49.     Status Panel ..................................................3-3
  50.  
  51.     Edit Card .....................................................3-4
  52.  
  53.     Card Editor ...................................................3-5
  54.  
  55.  
  56. Chapter 4    Objects.
  57.  
  58.     Objects Overwiev ..............................................4-1
  59.  
  60.     Buttons .......................................................4-5
  61.  
  62.     Windows .......................................................4-14
  63.  
  64.     Menus .........................................................4-20
  65.  
  66.     Fields ........................................................4-25
  67.  
  68.     Document ......................................................4-28
  69.  
  70.     Timers ........................................................4-32
  71.  
  72.     Sounds ........................................................4-34
  73.  
  74.     Animation .....................................................4-37
  75.  
  76.     Disk ..........................................................4-38
  77.  
  78.     Routines ......................................................4-38
  79.  
  80.     ARexx .........................................................4-39
  81.  
  82.     Xtras .........................................................4-40
  83.  
  84.                                       2
  85.  
  86. Chapter 5    Script Editor.
  87.  
  88.     Script Editor .................................................5-1
  89.  
  90.     Editor Tools ..................................................5-4
  91.  
  92.     Paint Editor Tool .............................................5-5
  93.  
  94.     Text Editor Tool ..............................................5-8
  95.  
  96.     Sound Editor Tool .............................................5-9
  97.  
  98.     Picture Editor Tool ...........................................5-10
  99.  
  100.     DOS Editor Tool ...............................................5-11
  101.  
  102.     File Editor Tool ..............................................5-11
  103.  
  104.     Coordinates Editor Tool .......................................5-11
  105.  
  106.     Card Finder Editor Tool .......................................5-12
  107.  
  108.     Routine Editor Tool ...........................................5-12
  109.  
  110.     Field Editor Tool .............................................5-13
  111.  
  112.     ARexx Editor Tool .............................................5-15
  113.  
  114.                                       3
  115.  
  116. Chapter 6    Commands.
  117.  
  118.     Commands Overwiev .............................................6-1
  119.  
  120.     Expressions ...................................................6-3
  121.  
  122.     Functions .....................................................6-10
  123.  
  124.     FlowControl Commands ..........................................6-18
  125.  
  126.     CardMovement Commands .........................................6-23
  127.  
  128.     Graphic Commands ..............................................6-24
  129.  
  130.     Screen and Window Commands ....................................6-35
  131.  
  132.     Brush Animation Commands ......................................6-38
  133.  
  134.     Audio Scripting Commands ......................................6-42
  135.  
  136.     Document Commands .............................................6-45
  137.  
  138.     File I/O Commands .............................................6-53
  139.  
  140.     Icon Commands .................................................6-55
  141.  
  142.     ARexx Commands ................................................6-58
  143.  
  144.     Object Commands ...............................................6-60
  145.  
  146.     Buffer Commands ...............................................6-62
  147.  
  148.     Mics. Commands ................................................6-66
  149.  
  150.  
  151.                                       4
  152.  
  153. Chapter 7    Appendices.
  154.  
  155.     Commands Index ................................................7-1
  156.  
  157.     LoadFlags Appendix ............................................7-7
  158.  
  159.     Advanced Features .............................................7-8
  160.  
  161.     Error Messages - Syntax Errors ................................7-10
  162.  
  163.     Error Messages - Run Time Errors ..............................7-11
  164.  
  165.     Error Messages - File Errors ..................................7-13
  166.  
  167.  
  168.                                       5
  169.  
  170.                                  Chapter 1
  171.  
  172.                             What Does CanDo Do?
  173.  
  174.     CanDo is a revolutionary, Amiga specific, interactive software
  175. authoring system. Its unique purpose is to let you create real Amiga software
  176. without any programming experience. CanDo is extremely friendly to you and
  177. your Amiga. Its elegant design lets you take advantage of the Amiga's
  178. sophisticated operating system without any technical knowledge. CanDo makes
  179. it easy to use the things that other programs generate - pictures. sounds,
  180. animations, and text files. In a minimal amount of time, you can make programs
  181. that are specially suited to your needs. Equipped with CanDo, a paint program,
  182. a sound digitizer, and a little bit of imagination, you can produce standalone
  183. applications that rival commercial quality software. These applications may be
  184. given to friends or sold for profit without the need for licenses or fees.
  185.     Although CanDo is especially easy to use, it is extremely powerful
  186. and versatile. Its uses range from building simple slide shows and interactive
  187. presentations to animated multimedia productions, quality educational
  188. software, and even sophisticated control applicatons that communicate with
  189. external video and audio equipment. CanDo lets you build small programs and
  190. add features as you need them.
  191.     Since Cando opens the world of software development to all Amiga
  192. users, is has the potential of making an endless number of applications
  193. available to every Amiga owner. We are very excited about this becoming a
  194. reality and hope to facilitate it with future enhancements and support.
  195.  
  196.  
  197. Whatzindabox?
  198.  
  199.     Along with this Manual, the package should contain Two Disks:
  200. CanDo and CanDoExtras. Also included in the box is a Registration Card that
  201. you should take the time to fill out and return to us. This will enable us to
  202. inform you of CanDo revisions and will help our technical support staff to
  203. help you.
  204.     Please take a look at the ReadMe files on each of the CanDo Disks.
  205. They contain last minute information that was not available when this Manual
  206. was printed. They may be viewed by doouble clicking their icons.
  207.  
  208.  
  209. CanDo System Requirements
  210.  
  211.     CanDo will work on any Amiga computer that has at least on (1)
  212. megabyte of memory. If you don't have a hard drive, it is recommended that you
  213. have two 3 1/2" floppy drives. Since CanDo makes it easy to work with sizable
  214. data like pictures and sounds, a hard drive and expanded memory will
  215. dramatically increase your effciency and productivity. Be sure your Amiga is
  216. running WorkBench version 1.2 or greater.
  217.     This manual assumes you are familiar with the operation of your
  218. computer as wxplanied in the manual that came with your Amiga. You should know
  219. how to use the mouse, start applications from WorkBench, and do simple
  220. WorkBench operatons.
  221.  
  222.                                      1-1
  223.  
  224. You CanDo a Backup
  225.  
  226.     Please, before you use CanDo, make copies of all the original disks.
  227. Work with these copies and keep the originales in a safe place. For your
  228. convenience CanDo is not copy protected so spread the word not the disk.
  229.  
  230. TO MAKE COPIES OF THE CANDO DISKS:
  231.  
  232. 1. Write-protect both CanDo disks by flipping up the write protect tab on the
  233.    disks. This will protect them from accidental erasure.
  234.  
  235. 2. Place the CanDo disk into drive DF0: and select the disk icon so that it is
  236.    highlighted.
  237.  
  238. 3. Select Duplicate from the WorkBench menu. Select Continue when asked to
  239.    insert CanDo.
  240.  
  241. 4. Insert a blank disk into drive DF0: when asked for the disk.
  242.  
  243. 5. Exchnage disks when requested and select Continue until the copy is
  244.    complete.
  245.  
  246. 6. Once you have a copy, rename it by highlighting the disk icon and selecting
  247.    Rename from the WorkBench menu. Remove the "Copy of" text that was appended
  248.    to CanDo. Be sure to delete any spaces that precede the name.
  249.  
  250. 7. Repeat the procedure for the CanDoExtras disk.
  251.  
  252.  
  253. CanDo on a Hard Disk or a Floppy Disk
  254.  
  255. CANDO ON A HARD DISK OR A FLOPPY DISK
  256.     CanDo is easy to install on your hard disk. You'll need at least one
  257. (1) megabyte free on your hard disk before copying CanDo and all the support
  258. files.
  259.     For floppy disk owners, CanDo will run directly from the working copy
  260. you maed. You must start your Amiga with this CanDo disk and run CanDo from
  261. the icon. You will likely choose to install CanDo on your own WorkBench
  262. startup disk. This is done by using the CanDoInstall program found on the
  263. CanDoExtras disk.
  264.  
  265. TO INSTALL CANDO ON YOUR WORKBENCH DISK OR YOUR HARD DISK:
  266.  
  267. 1. Start your computer normaly andthen insert the CanDoExtras disk into drive.
  268.  
  269. 2. Open the CandoExtras disk by double clicking its icon on WorkBench. Open
  270.    the Utilities drawer.
  271.  
  272. 3. Now the Installer program may be started by double clicking on its icon.
  273.  
  274. 4. This program will guide you through the installation process for both
  275.    floppy drives and hard drives.
  276.  
  277. 5. Once the installation is complete, you may remove the CanDoExtras disk and
  278.    close its window.
  279.  
  280. 6. CanDo may mow be started from your floppy or hard disk by double clicking
  281.    its icon.
  282.  
  283.                                      1-2
  284.  
  285.                    A couple of questions you might have...
  286.  
  287. WHY DO I NEED TO "INSTALL" CANDO?
  288.  
  289.     When CanDo is started, is looks in an Amiga system directory called
  290. LIBS: and another called L: for support files. These particular directories
  291. that the Amiga uses to keep special files. The CanDoInstall program copies
  292. these files for you.
  293.  
  294. WHAT AM I CREATING WHEN I USE CANDO?
  295.  
  296.     The applications you create with CanDo are called Decks. This is
  297. because they comprised of Cards. In CanDo you work with Cards one at a time
  298. and they may have completely different environments and characteristics. When
  299. you save a Deck from CanDo, it is like an executable program that you may
  300. start by double clicking its icon on the WorkBench screen. These Decks are
  301. actually small files that use a "Library" that is installed on your system.
  302. All CanDo Decks and CanDo itself efficiently share the use of this library.
  303. This arrangement enables you to run many Decks at the same time and use the
  304. Amiga's memory and its resources to the full extent of its capabilites.
  305. Remember, the CanDo library is not a distributable protion of CanDo.
  306.  
  307. HOW DO I MAKE A DISTRIBUTABLE CANDO APPLICATION?
  308.  
  309.     When you are ready to make an executable version of your program, you
  310. can do so easily with the Binder. This utility can create a distritable
  311. version of your project in either of two ways:
  312.  
  313. 1. INDEPENDENT PROJECT: A form of your Deck whick will run on any Amiga,
  314. regardless of whether or not CanDo is also available on the Amiga. Programs
  315. produced in this way can be sold or distributed without a license or fees of
  316. any kind. These programs have the primary part of the CanDo support software
  317. built into them.
  318.  
  319. 2. DEPENDENT PROJECT: A form in which the project will only run if you or your
  320. friends, or potential customers, have CanDo already. This type of bound
  321. project is significantly smaller in size than an Independent Project (it
  322. shares the same library of functions that CanDo uses), and is the perfect way
  323. to make a program which you intend to give or sell only to people who already
  324. own CanDo.
  325.  
  326.                                      1-3
  327.  
  328.     To "Bind" a Deck, select the Deck's icon the you would like to make
  329. standalone and then, while holding down the shift key, double click on the
  330. Binder icon. It will guide you through the binding process and create a
  331. standalone application. Remember the icon for your new application will not be
  332. visible in a WorkBnech window until it is re-opened. The standalone deck may
  333. now be distributed along with any graphics or sound files that it uses. Don't
  334. forget that these resource files must be found in the directories that were
  335. specified when the Deck was created.
  336.  
  337. CAN I MAKE ROOM ON MY CANDO DISK IF I DON'T NEED ALL THE FEATURES?
  338.  
  339.     CanDo is very modular in design. If you don't need some of its
  340. features, you may remove them from your disk. If you don't use ARexx objects
  341. you may open the Objects drawer and discard it. Similarly, you may discard
  342. items in the EditorTools,Xtras, and HelpFiles drawers. Make sure you have a
  343. backup of these files in case you need these features in the future.
  344.     The modular design of CanDo also enables you to add features in the
  345. future when they become available.
  346.  
  347. HOW DO I GET HELP?
  348.  
  349.     If you have a problem that this manual does not address, please call
  350. our Support Staff at: +1 214 340 4992 or if you have a modem, you can call our
  351. Product Support BBS at: +1 214 357 8511 (300/1200/2400 Baud)
  352.  
  353.                                      1-4
  354.  
  355.                                   Chapter 2
  356.  
  357.                                 You CanDo It.
  358.  
  359.     There are two methods of starting CanDo.
  360. FIRST: CanDo has a Workbench Icon. Double-clicking on this Icon automatically
  361.        launches the program.
  362. SECOND: CanDo may be launched from a CLI or Shell by typing
  363.  
  364.     CanDo
  365.  
  366. and then pressing RETURN. CanDo will begin to load. THE CANDO REPORTER, a
  367. small message window, will appear and inform you that the files that makeup
  368. CanDo and its user interface are loading. The last message you will see is
  369. "All done, finishing up."
  370.     Now, at the bottom of the display, you will see CanDo's MAIN CONTROL
  371. PANEL and behind the panel is your default window.
  372.  
  373. You CanDo an Application.
  374.  
  375.     The first sorfware project that you're going to create is a very
  376. simple one. When executed, this Program will open a Window, (or Card as we
  377. will now call them). All CanDo applications consist of Cards and Decks. Cards
  378. are the basis building blocks of any CanDo project. A Card contains a single
  379. Window and all its Objects and Attributes. A Deck consists of several Cards.
  380. Moing between Cards and Decks is a fundamental part og CanDo project design.
  381.     We will begin working on the first Card of this three Card project.
  382. It will have a full screen IFF Image displayed. On this Image, we are going to
  383. place two Buttons (or Gadgets in Amiga-ese), one with the words "Next Critter"
  384. written on it, and the other with the word "Quit". When the Button marked NEXT
  385. CRITTER is clicked, a second IFF Image will be shown. Clicking it again shows
  386. a thrid Image. Each Image is its own Card, with Buttons identical to the ones
  387. on the other Cards that you have created. When any of the Buttons marked QUIT
  388. are clicked, the program will stop and the user will be returned to the CLI or
  389. Workbench.
  390.  
  391. Lets Do It.
  392.  
  393.     On the CanDo MAIN CONTROL PANEL there are three boxes: Status, Cards,
  394. and Objects. There are two Buttons in the Status box: Design and Browse.
  395. Selecting DESIGN allows you to create your projects. You can select BROWSE to
  396. test or run your creations at any time, without exiting CanDo.
  397. Ready to start?
  398.  
  399.                                      2-1
  400.  
  401. 1.  Click on the DESIGN Button to begin working on your project.
  402.  
  403. 2.  Click on the WINDOW Button (Pic.#1/Fig.#1) in the OBJECTS protion of the
  404.     MAIN CONTROL PANEL. This is the first step in the creation of a background
  405.     image for your first Card. You'll be shown the WINDOW EDITOR. This is how
  406.     you'll describe your window. You can type your Window's name in the Field
  407.     under "Window Title" but for this example, we want to clear out the default
  408.     name.
  409.  
  410. 3.  Click in the Field then press the RIGHT AMIGA KEY + X which will clear the
  411.     Field. This will produce a blank Title Bar above your Window, giving it a
  412.     cleaner look.
  413.  
  414. 4.  Now click on the DIMENSION Button. The DIMENSION REQUESTER appears.
  415.     (Pic.#1/Fig.#2)
  416.  
  417. 5.  Click on the Button to the right of "Picture". This brings up CanDo's FILE
  418.     REQUESTER. Use the requester to locate the file RABBIT.PIC that was
  419.     incluced on your CanDoExtras disk. Refer to chapter 4-4 of the manual for
  420.     information on how it operates.
  421.  
  422.  
  423. 6.  Choose the RABBIT.PIC file. The Path Field now showes the correct directory
  424.     path and the File Field shoes "Rabbit.pic."
  425.  
  426. 7.  Now click the OK Button. This will return you to the DIMENSION REQUESTER.
  427.     The Button nest to "Picture" now shoes, the highlighted Name RABBIT.PIC,
  428.     the File you chose. When your Window odes open it will have the proper
  429.     dimensions and resolution for the picture file you have just chosen, with
  430.     the picture as it's background.
  431.  
  432.                                      2-2
  433.  
  434. 8.  Again click the OK Button. This returns you to the WINDOW EDITOR. On the
  435.     right, you'll see several Buttons. You've already used the first one
  436.     "Dimension". For this application, you'll also use the bottom one,
  437.     "Options."
  438.  
  439. 9.  Click on the OPTIONS Button. This will bring up the OPTIONS REQUESTER which
  440.     has several choices. For this example, you will need to change only one of
  441.     the default settings.
  442.  
  443. 10. Click on the first Button, THE WINDOW HAS VISIBLE BORDERS. The Button will
  444.     change to THE WINDOW'S BORDERS ARE INVISIBLE.
  445.  
  446. 11. Now click on the OK Button. This will return you to the WINDOW EDITOR.
  447.     (Pic.#1/Fig.#3)
  448.  
  449. 12. Now click on OBJECTS. Thi brings up the OBJECTS REQUESTER. Click on the
  450.     CLOSEBUTTON icon to deselect it, we won't need one. Click OK.
  451.  
  452. 13. Click on the WINDOW EDITOR's OK Button. There's your Rabbit. You've
  453.     created your Window and you are back at the CanDo MAIN CONTROL PANEL.
  454.     To see the whole picture...
  455.  
  456. 14. Click on the UP/DOWN ARROW Button on the right side of the panel. The
  457.     panel will drop out of the way.
  458.  
  459.                                      2-3
  460.  
  461. 15. Click the UP/DOWN ARROW Button again and the panel returns the to its
  462.     working position. You're now ready to add a title to this picture. To
  463.     do this you need to write a Script.
  464.  
  465. 16. Click on the EDIT CARDS Button (Pic.#1/Fig.#4) in the Cards portion of the
  466.     MAIN CONTROL PANEL. This will bring up the CARD SYSTEM. Here you will see
  467.     a card Requester with one file name in it "Card#1". This is the Card
  468.     you've been working on. Since it is already selected...
  469.  
  470. 17. Click on the EDIT Button. This will bring up the CARD EDITOR. here you see
  471.     three Button that allow you to attach Scripts to your Card. But what is a
  472.     Script anyway?
  473.     A script is a Command (or, more often, a series of them) to be
  474.     executed under certain conditions in a CanDo project. A Script is often
  475.     attached to an event in your application. In other words, events like
  476.     clicking a Button, activating (clicking on) a Window, or goind from one
  477.     Card to another can cause a Script of Commands to be executed. Script
  478.     Commands can beused to play a sound or sound sequence, run animations,
  479.     move from one Card in a Deck to another Card, add text to a Window and
  480.     many mor complex tasks.
  481.     While this example project uses scripts in their basic, most straight
  482.     forward form, you may wish to take a moment to look at the complete list
  483.     of Scripting Commands, together with descriptions, syntax, and examples,
  484.     that appear in the Commands Section of this manual. This side trip will
  485.     give you an idea of the power and simplicity of CanDo's Scripting
  486.     Languarge.
  487.  
  488.                                      2-4
  489.  
  490. 18. Now back at The CARD EDITOR, you will need to choose one of the three
  491.     Buttons to add tie title to your picture. Your chices are: at the Card's
  492.     StartUp. AfterStartUp, or when Leaving the Card. You want the title to
  493.     appear in your Window immediately after the Rabbit graphic is displayed.
  494.     Click the AFTERSTARTUP Button.
  495. 19. In the SCRIPT EDITOR (Pic.#2/Fig.#5), type the following lines verbatim.
  496.  
  497.     SETPAN 2
  498.     PRINTTEXT "The Friends of Elly Mae",70,45
  499.  
  500.     The Setpen Command sets the color of the text to be written from the
  501.     Window's palette. The PrntText Command simply prints the text within the
  502.     quotes at the coordinates specified ( 70 , 45 ). This means 70 pixels over
  503.     and 45 pixels down.
  504.  
  505. 20. Click the OK Button to ad this Script to your project.
  506.  
  507. 21. At the CARD EDITOR, click OK.
  508.  
  509. 22. Now click EXIT to leave the CARD EDITING SYSTEM.
  510.     You're back at the MAIN CONTROL PANEL. You may want to go into Browse mode
  511.     to check your creation so far.
  512.  
  513. 23. Click BROWSE in the STATUS PANEL.
  514.  
  515.     In the Cards portion of the MAIN CONTROL PANEL you see an Arrow
  516.     (Pic.#1/Fig.#6) Button pointing to the right, that's the NextCard Button.
  517.     When the NextCard Button is clicked, the next Card in your Deck in
  518.     rendered (or "started-up") on Screen one after another. When you reach the
  519.     last Card in your Deck and click NextCard again, CanDo loops back to the
  520.     first Card in the Deck. Since we have only one Card so far in this
  521.     example, clicking the NextCard Button will result in looping back to the
  522.     same Card.
  523.  
  524.                                      2-5
  525.  
  526. 24. Now click the NEXTCARD Button. Your Card, picture, title and all will be
  527.     freshly rendered on your Screen. Not bad!.
  528.     Now, we want to make this good lokking window do something else, so
  529.     let's Add some Buttons.
  530.  
  531. 25. First, click on the ADD Button in the OBJECT PANEL.
  532.  
  533. 26. Then, click on the BUTTONS Button (Pic.#1/Fig#7) in the same panel. The
  534.     BUTTON OBJECT SYSTEM REQUESTER will appear. This Requester asks you to
  535.     locate the Origin Point of your new Button.
  536.  
  537. 27. Click the OK Button.
  538.     The EDIT BUTTON REQUESTER will be lowered revealing your full Screen. Move
  539.     your Mouse to position the Pointer on Screen where you want your Button.
  540.     For this execise move the Pointer to above the "T" in the word "The".
  541.  
  542. 28. Now click and release the LEFT MOUSE Button to set the Origin Point. Move
  543.     your Mouse, notice that it now controls the shape and size of a rectangle.
  544.     Move the Mouse in any directon you choose, adjusting the rectangle until
  545.     you are satisfied with its size and shape.
  546.     If you don't like the Button for some reason, click the ESC Key and
  547.     start the process over.
  548.  
  549. 29. If the location and shape are to your liking, click the LEFT MOUSE Button.
  550.     The BUTTON EDITOR REQUESTER will be displayed and the location (origin)
  551.     coordinates of the Button you've just created, in horizontal and vertical
  552.     format, will have been entered for you automatically. You will also see
  553.     the Button shape you have created positioned on the Screen. You may edit
  554.     these by clicking in the field and typing new coordinates. Edit "Horiz" to
  555.     be 50 and "Vet" to be 25.
  556.     There are three types of Buttons in CanDo: Area, Text, Image. The
  557.     Button we're making will be a Text Button.
  558.  
  559.                                      2-6
  560.  
  561. 30. Press the BOX next to "Text". This brings up the FONT/TEXT REQUESTER. Here
  562.     you will select your Font. The default setting of Topaz 8 Plain will work
  563.     well here.
  564.     Notice, there are several style options available. This time choose
  565.     SHADOWED.
  566.     You'll also see three COLOR SELECTORS. Click the left one, it governs
  567.     the color of the text on your Button.
  568.     Across the bottom of the Screen you will see a Color Palette. Click
  569.     on a bright, light color. Your choice will be displayed in the Selector
  570.     you clicked on.
  571.     You can also choose colors using the Arrows on the Selector. You may
  572.     change the second Color Selector to suite your tastes. Try it.
  573.  
  574. 31. Now, click in the "Text" Field and press the RIGHT AMIGA Key and X to
  575.     clear the Field. Now type...
  576.  
  577.     QUIT
  578.  
  579.     This text will become part of the Button.
  580.  
  581. 32. Click the OK Button. This will return you to the BUTTON EDITOR REQUESTER.
  582.     To enable the "Quit" Button to actually end a project we must attach a
  583.     Script to it. There are four Button Events which can trigger a Script.
  584.     This time you want the Script executed when the Mouse Button is let up
  585.     after being pressed. This is called a Release script.
  586.  
  587. 33. Click on RELEASE in the Scripts portion of the Requester. A SCRIPT EDITOR
  588.     REQUESTER will appear. Type:
  589.  
  590.     QUIT
  591.  
  592. 34. Click on the OK Button.
  593.  
  594. 35. At the EDIT BUTTON REQUESTER, click on the OK Button. Now you're back at
  595.     the MAIN CONTROL PANEL.
  596.     The procedure for making the second Button is exactly the same as the
  597.     first except that this Button's text and positon will be different.
  598.  
  599. 36. Click no ADD and then on the Button in the MAIN CONTROL PANEL. Place this
  600.     Button's Origin to the right of the "Quit Button" you just created and
  601.     draw another small rectangle. You may adjust its coordinates to a
  602.     horizontal of 175 and a vertical 25. This time, the text for the button
  603.     will be "Next Critter" and its Release Script will be:
  604.  
  605.     NEXTCARD
  606.  
  607.     When you have your new button finished you should click OK at all
  608.     Requesters until you're back at CanDo's MAIN CONTROL PANEL.
  609.     Now when you click "Next Critter" the project will go to its Next
  610.     Card, which will also contain a Picture and some Buttons. What next Card
  611.     you say? You can make on in less then thirty seconds.
  612.  
  613.                                      2-7
  614.  
  615. 37. Click on the Edit Cards Button in the Cards portion in the main panel.
  616.     This brings the CARD SYSTEM back up.
  617.     Click on the DUPLICATE Button on the right of the Requester.
  618.     A second Card will added to your project. This Card is a duplicate of your
  619.     first Card. Since your first window was a Picture Window, the window in
  620.     your second Card will be a Picture Window as well, complete with same
  621.     graphics.
  622.     The new window also has the same Window Options and Window Objects as
  623.     the first window.
  624.     The Buttons and scirpts are carried over to the new Card.
  625.  
  626. 38. This window will require changes to the script, so, here at the CARD
  627.     EDITOR, click on AFTERSTARTUP.
  628.     When the SCRIPT EDITOR comes up, select the menu option CLEAR under
  629.     the Scripts menu. Click YES to verify that you really want to du this.
  630.     Then click OK to leave the SCRIPT EDITOR.
  631.     Click Ok at the CARD EDITOR. Exit the Card Editing system. Your are
  632.     now working on a new Card. And since we don't really want two pictures of
  633.     the same rabbit, let's change the graphic to a different critter.
  634.  
  635. 39. Click the WINDOWS Button on the MAIN CONTROL PANEL. In the WINDOW EDITOR,
  636.     click on DIMENSIONS and then select PICTURE Button again to get the FILE
  637.     REQUESTER.
  638.     When it comes up, select the graphic file PORCUPINE.PIC. Click OK.
  639.     Since the options of first window are carried over to this one, and we want
  640.     to use them as they are, you cdan now click OK. Your second Card is now
  641.     finished and operational.
  642.  
  643. 40. The third and final Card will be by far the easiest to create. We are
  644.     going to clone the second Card, complete with graphic, buttons, and
  645.     scripts. Then, we'll simply substitute a new critter pic.
  646.  
  647. 41. Repeat step 37 and there's no need to edit the AfterStartUp Script.
  648.  
  649. 42. Repeat step 38 and this time use the MINK.PIC file. Return to the MAIN
  650.     CONTROL PANEL. If you want, you can change the border style or text color
  651.     of any button by clicking EDIT and then on the actual button you would like
  652.     to edit.
  653.  
  654. 43. If you're not at the MAIN CONTROL PANEL, return to it for your final step
  655.     in this project. Under the "Deck Menu", select SAVE. You will be prompted
  656.     to give a filename and pathname. Now click OK.
  657.     And that's it! You've just created a working program. Congratulations.
  658.  
  659.                                      2-8
  660.  
  661.                                 Second Project
  662.  
  663.     Your second Project will be very different from the first. It will be
  664. an extremely useful and flexble Application, and in some ways, easier to
  665. create the your first one was.
  666.     We call this Application a "PowerPanel" and it puts almost any Amiga
  667. Command or Application just a click of the Mouse away.
  668.     You create it using CanDo's DOS Command. This Command allows you to
  669. run any Program as though it was a CLI Command. Because all Programs cannot be
  670. run through CLI, you should always consult the Program's Documentation before
  671. using it with CanDo's DOS Command.
  672.  
  673. The PowerPanel.
  674.  
  675.     A PowerPanel is (or at least can be) a Window that opens on the
  676. Worbench Screen with several Buttons on it. For example, there could be a
  677. Button that says "Paint" on it. When the Button is clicked, the PowerPanel
  678. could start your favorite paint program.
  679.     These PowerPanel Buttons can set up entire environments: change
  680. directories, make assignments... do almost anything.
  681.     This PowerPanel example will be designed to perform functins
  682. accessible to all Amiga / CanDo users:
  683.  
  684.     * Run CanDo
  685.  
  686.     * Run Phone Index ( a CanDo application )
  687.  
  688.     * Open a new CLI
  689.  
  690.     * Run the Workbench Calculator Utility.
  691.  
  692.     * Play some Sampled Sounds ( just for grins )
  693. They're a breeze to create and run, so lets get started.
  694.  
  695. 1.  Click the DESIGN Button.
  696.  
  697. 2.  Click on the WINDOWS Button in OBJECTS. The WINDOW EDITOR REQUESTER will
  698.     appear.
  699.  
  700. 3.  Clear the "Window Title Field" and replace the title with... POWERPANEL
  701.  
  702. 4.  Click on the DIMENSION Button. (Pic.#1/Fig.#2)
  703.  
  704. 5.  The DIMENSION REQUESTER, appears. In the "Position and Size" portion set
  705.     the Window's X coordinate to 50 and the Y coordinate to 15
  706.  
  707.                                      2-9
  708.  
  709. 6.  Set the Window's Width to 177 and Hight to 78.
  710.  
  711. 7.  You'll use four colors ( the Workbench colors ), so click on 4 under "# of
  712.     Colors".
  713.  
  714. 8.  Click OK to return to the WINDOW EDITOR REQUESTER.
  715.  
  716. 9.  Click on the OBJECTS Button to open the OBJECT REQUESTER.(Pic.#1/Fig.#3)
  717.     Here you see graphic representations of these familiar Amiga Window
  718.     objects: Close Button, Depth Buttons, Drag Bar and Resizing Button. When
  719.     added to CanDo Projects, all four Objects perform their standard
  720.     functions.
  721.     For example: a Window's Close Button will execute a Script when
  722.     clicked which could quit the program, go to the next card, or perform any
  723.     CanDo Command.
  724.     For this Project select the CLOSE BUTTON, DEPTH BUTTON, and the DRAG
  725.     BAR. When selected, their Buttons will be highlighted. Click OK to record
  726.     these choices.
  727.  
  728. 10. At the WINDOW EDIT REQUESTER. Click OK You are back at the MAIN CONTROL
  729.     PANEL and a smaller Window has been opened on your Workbench Screen. This
  730.     is your PowerPanel Window an you're ready to create your PowerButtons.
  731.     First, we'll Add the Button that starts CanDo. It will be a Text
  732.     Button and will be created in the same manner as the Quit Button in the
  733.     First Tutorial Project. Only the placement of the Button on the PowerPanel
  734.     Screen and the Text on the Button will be different.
  735.  
  736. 11. Click ADD and the BUTTON Button under Objects.
  737.  
  738. 12. At the Add New Button Requester click OK.
  739.  
  740. 13. Move the Pointer to a position in the upper left corner of your PowerPanel
  741.     Window. Click the LEFT MOUSE Button to set the Origin Point. Size the
  742.     Button rectangle as before and click the LEFT MOUSE Button.
  743.  
  744. 14. At the EDIT BUTTON REQUESTER in the Origin section adjust the Button's
  745.     Origin Point by changing the Horizontal and Vertical coordinates to 13 and
  746.     14. The exact size you made this Button is unimportant because it will
  747.     automatically adjust to the size of the Text that we put in it.
  748.  
  749.                                      2-10
  750.  
  751. 15. Now click on OUTLINE in the Border section.
  752.  
  753. 16. At the BORDER SELECTOR click on the EMBOSSED Button. Now choose the Border
  754.     Colors you want using the COLOR SELECTORE and click OK.
  755.  
  756. 17. At the BUTTON EDIT REQUESTER click on the BOX next to "Text" under
  757.     "Style". The TEXT BUTTON DEFINITION REQUESTER will appear. In this
  758.     Requester you will set these parameters:
  759.  
  760.     Font:    TOPAZ
  761.     Font Size:    8
  762.     Font Style:    PLAIN
  763.     Text Color:    ( Your Choice )
  764.     Text:    CanDo
  765.  
  766.     With these settings click OK.
  767.  
  768. 18. At the BUTTON EDITOR REQUESTER click the RELEASE Button under "Scripts".
  769.  
  770. 19. At the SCRIPT EDITOR, the far right hand slider controls a List of Editor
  771.     Tool Icons. Locate and the Select the DOS Editor Tool. (Pic.#1/Fig.#8)
  772.  
  773. 20. At the CANDO FILE REQUESTER use the File List on the right to find, then
  774.     Select the CANDO Program File. Click OK.
  775.  
  776. 21. At the SCRIPT EDITOR you will see that the proper DOS Scripting Command
  777.     has been automatically typed into the Editor. Click on OK.
  778.  
  779. 22. At the EDIT BUTTON REQUESTER click OK. The MAIN CONTROL PANEL, your
  780.     PowerPanel Window and it's first Button will appear.
  781.  
  782.                                      2-11
  783.  
  784.     The remainder of the Buttons you will define for this Project are
  785. Text Buttons alson. Retrace steps 11 through 22 which you used to create your
  786. first PowerButton but use these Button Definitions below. Other possible
  787. differences can be variations in Font choice, Text Color and Border Style. Use
  788. the DOS EDITOR TOOL to locate the program each button will start.
  789.  
  790.     Following is a description of each Button you need to define:
  791.  
  792.     Phone Index Button
  793.  
  794.     Button Co-ordinates:    72, 14
  795.     Border Style:        EMBOSSED
  796.     Font:            TOPAZ
  797.     Font Size:        8
  798.     Font Style:        PLAIN
  799.     Text Color:        ( Your Choice )
  800.     Text:            PHONE INDEX
  801.     Program:            CanDoExtrax:Utilities/PhoneIndex
  802.  
  803.  
  804.     Calculator Button
  805.  
  806.     Button Co-ordinates:    13, 32
  807.     Button Style:        EMBOSSED
  808.     Font:            TOPAZ
  809.     Font Size:        8
  810.     Font Style:        PLAIN
  811.     Text Color:        ( Your Choice )
  812.     Text:            CALCULATOR
  813.     Program:            Sys:Utilities/Calculator
  814.  
  815.  
  816.     New CLI Button
  817.  
  818.     Button Co-ordinates:    112, 32
  819.     Button Style:        EMBOSSED
  820.     Font:            TOPAZ
  821.     Font Size:        8
  822.     Font Style:        PLAIN
  823.     Text Color:        ( Your Choice )
  824.     Text:            NEWCLI
  825.     Program:            C:NewCLI
  826.  
  827.                                      2-12
  828.  
  829. 23. Return to the MAIN CONTROL PANEL. Now, let's add some text to the Window
  830.     to explain that the Buttons at the bottom of the panel that we are about
  831.     to add are for playing sounds. Click on the EDIT CARDS Button in the CARDS
  832.     BOX. The CARD SYSTEM REQUESTER will appear. Press the EDIT Button to edit
  833.     the only card listed, "Card#1" The CARD EDITOR REQUESTER will appear.
  834.     Press the AFTERSTARTUP Button to add the Script that will be performed
  835.     after the card's window has been opened and all the Buttons have been
  836.     attached.
  837.  
  838. 24. You want to print the text "Sound Samples" just below the Buttons you've
  839.     already made. Type in the followind Script.
  840.  
  841.     SETPEN 1
  842.     PRINTTEXT "Sound Samples",35,48
  843.     PRINTTEXT
  844.  
  845. 25. Press OK to save the Script. This will return you to the CARD EDITOR
  846.     REQUESTER.
  847.  
  848. 26. Press OK again to return to the CARD SYSTEM REQUESTER.
  849.  
  850. 27. Now press EXIT to return to the MAIN CONTROL PANEL.
  851.  
  852. 28. Click on BROWSE, and then click the NEXTCARD Button in the Cards panel.
  853.     You'll see the text you just created appear in your Window.
  854.  
  855. 29. Now click the DESIGN Button. You're going to add a few simple unmarked
  856.     rectangular Buttons. Each one, when clicked, wil play a different sampled
  857.     sound.
  858.  
  859. 30. Click on EDIT and then on the BUTTONS Button in the Objects panel.
  860.  
  861. 31. At the BUTTON EDITING SYSTEM, click ADD. When prompted, place the Origin
  862.     of the first of these sound buttons in the lower left corner of your
  863.     Window. This Button is going to be an "Area Button". When the EDIT BUTTON
  864.     REQUESTER comes up, rename this Button "Sound1". Then, adjust the Button's
  865.     co-ordinates to 13, 62.
  866.  
  867. 32. Click on AREA and the AREA BUTTON REQUESTER will appear. Adjust the Button
  868.     size to 25,10, using the Width and Height Fields in the Requester. All of
  869.     our "Sound Buttons" will be this size.
  870.  
  871. 33. Click OK to return to the EDIT BUTTON REQUESTER. The Border and High light
  872.     styles may be experimented with, but the defaults will work well for your
  873.     purpose. Now, you'll want to add a Release Script, so click RELEASE.
  874.  
  875.                                      2-13
  876.  
  877. 34. At the SCRIPT EDITOR, click the SOUND EDITOR TOOL (Pic.#1/Fig.#9) on the
  878.     right.
  879.  
  880. 35. Select SET THE FILENAME from the PLAY A SOUND REQUESTER. This will bring
  881.     up CanDo's FILE REQUESTER. Find the DOGBARK.SND file, select it and then
  882.     click OK.
  883.  
  884. 36. Click OK at the PLAY A SOUND REQUESTER. The PlaySound Command will have
  885.     typed into your script. Click OK to save the script.
  886.  
  887. 37. At the EDIT BUTTON REQUESTER. Click OK. You are now back at the MAIN
  888.     CONTROL PANEL.
  889.  
  890.     There will be three more "sound buttons" like this one, except with
  891. different co-ordinates and different sounds attached.
  892.  
  893.     REPEAT STEPS 29 THROUGH 36 USING THE BUTTON DEFINITIONS BELOW:
  894.  
  895.  
  896.     SOUND 2
  897.  
  898.     Button Name:        Sound2
  899.     Co-ordinates:        55, 62
  900.     Area Button Size:    25, 10
  901.     Sound file:        ( Your Choice )
  902.  
  903.  
  904.     SOUND 3
  905.  
  906.     Button Name:        Sound3
  907.     Co-ordinates:        97, 62
  908.     Area Button Size:    25, 10
  909.     Sound file:        ( Your Choice )
  910.  
  911.  
  912.     SOUND 4
  913.  
  914.     Button Name:        Sound4
  915.     Co-ordinates:        139, 62
  916.     Area Button Size:    25, 10
  917.     Sound file:        ( Your Choice )
  918.  
  919.     Save your Deck now. Under the Decks Menu Select "Save". Use CanDo's
  920. File Requester to set the Path and File Name for your Deck. Click OK and
  921. you're done.
  922.  
  923.                                      2-14
  924.  
  925.                                   Chapter 3
  926.  
  927.                                 Decks & Cards
  928.  
  929.     A CanDo project is comprised of a Deck of Cards. CanDo Cards are
  930. somewhat like Flash Cards in that only one is shown at a time. However, unlike
  931. Flash Cards that only present information, CanDo Cards can both present and
  932. receive information. Furthermore, you can make things "happen" on a CanDo
  933. Card. You do this by making Objects.
  934.     The Window Object allows you to specify the overall appearance of
  935. your Card. Buttons and Menus, for example, allow the user of your project to
  936. tell it to do something. Other Objects allow you to easily receive information
  937. or otherwise control what is happening.
  938.     By adding Objects to a Card, you design what it looks like and what
  939. it does. The Card is simply a container for the Objects you give it. Some
  940. applications only need a single Card, while others need many Cards to change
  941. the interface, appearance or activity. By simply changing Cards, you can cause
  942. dramatic or subtle differences in what is happening.
  943.     When you have designed a Deck, you can save it to disk. This allows
  944. you to later load that Deck back into CanDo for futher editing. The Deck can
  945. be run separately by double clicking its icon from Workbench, or from a CLI
  946. using the CanDoRunner program.
  947.  
  948.     When you are ready to make an executable version of your program you
  949. can do so easily with the CanDo's Binder. It will create a new file that is a
  950. runnable program. However, the program created by the Binder can not be
  951. re-edited by CanDo. Make sure that you keep the original Deck saved by CanDo
  952. for later editing.
  953.     This Chapter tells you how to work with Decks and Cards. Chapter 4
  954. describes the Objects you can add to a Card. Chapters 5 and 6 describe how to
  955. write the Scripts that make your application come to life.
  956.  
  957.  
  958. Menus
  959.  
  960.     When CanDo's Main Control Panel is the active window, you can access
  961. CanDo's Menus. They are not accessible when hour application's Window is
  962. active. By clicking on any portion of the Main Control Panel, not necessarily
  963. on a Button, you activate the window. This gives you access to CanDo's Menus
  964. when you press the right mouse Button.
  965.     CanDo's Menus are: Deck, Card, Objects, and Misc. The Objects Menu is
  966. described in Chapter 4.
  967.  
  968.                                      3-1
  969.  
  970. Deck Menu
  971.  
  972. The Deck Menu has five items: New, Open, Save, About, and Quit.
  973.  
  974. NEW
  975.  
  976.     New deletes all existing Cards and starts you up in the default
  977. configuration. (see the Advanced Topics Appendix for changing the default
  978. Deck.)
  979.  
  980. OPEN
  981.  
  982.     Open replaces the current Deck with on loaded from a file. CanDo's
  983. File Requester allows you to locate the file. The file must be a Deck created
  984. with CanDo. You cannot load a Deck that has been made into a stand-alone
  985. program using CanDo's Binder.
  986.  
  987. SAVE
  988.  
  989.     Save writes the current Deck to a file specified with CanDo's File
  990. Requester. A saved Deck can be loaded into CanDo using Open. It can also be
  991. run separately by double clicking its Icon, or bound into a stand-alone
  992. program using CanDo's Binder.
  993.  
  994. ABOUT
  995.  
  996.     About simply displays a little information about INOVAtronics and
  997. CanDo.
  998.  
  999. QUIT
  1000.  
  1001.     Quit allows you to leave CanDo. A Requester will warn you if you have
  1002. modified the current Deck.
  1003.  
  1004.  
  1005. Card Menu
  1006.  
  1007. The Card Menu has five items: Goto, First, Last, Previous, and Next.
  1008.  
  1009. GOTO
  1010.  
  1011.     Goto... allows you to go to a specifiec Card. A requester will show
  1012. all the Card Names. Click on one of the names to highlight it. Clicking on the
  1013. Goto Button or double clicking one of the entries will cause you to change
  1014. Cards. When you want to stay on a Card, select the Exit Button.
  1015. FIRST
  1016.  
  1017.     First causes CanDo to go to the First Card in the Deck.
  1018.  
  1019. LAST
  1020.  
  1021.     Last causes CanDo to go the Last Card in the Deck.
  1022.  
  1023. PREVIOUS
  1024.  
  1025.     Previous causes CanDo to move back one Card. If you are on the First
  1026. Card, this will put you on the Last Card.
  1027.  
  1028. NEXT
  1029.  
  1030.     Next causes CanDo to move forward on Card. If you are on the Last
  1031. Card, this will put you on the First Card.
  1032.  
  1033.                                      3-2
  1034.  
  1035. Misc. Menu
  1036.  
  1037. The Misc. Menu has two items: SuperBrowse and System Info.
  1038.  
  1039. SUPERBROWSE
  1040.  
  1041.     SuperBrowse temporarily removes the CanDo interface to your
  1042. application. The MAIN CONTROL PANEL will disappear, and your application will
  1043. be able to interact a little faster. This mode allows you to see exactly how
  1044. your application will run as a separate program.
  1045.     When you enter SuperBrowse Mode, CanDo will open a small Window on
  1046. your Workbench Screen. When you double-click on the Window, CanDo's MAIN
  1047. CONTROL PANEL will reappear and you will no longer be in SuperBrowse Mode.
  1048.  
  1049. SYSTEM INFO
  1050.  
  1051.     System Info will display a requester displaying Available Memory,
  1052. CanDo version information, and other useful statistics.
  1053.  
  1054.  
  1055. Status Panel
  1056.  
  1057.     The Status Portion of the MAIN CONTROL PANEL (Pic.#2/Fig.#10) contains
  1058. the Browse and Design Buttons.
  1059.  
  1060. BROWSE
  1061.  
  1062.     By selecting BROWSE, you can test your application. Because CanDo is
  1063. monitoring your activity, your project will not be as responsive as when it is
  1064. running in SuperBrowse Mode or as a separate application.
  1065.  
  1066. DESIGN
  1067.  
  1068.     When DESIGN is selected, you can construct your application.
  1069. Selecting any Button on the MAIN CONTROL PANEL, other than Browse, will
  1070. automatically select Design.
  1071.     The FIRST, LAST, PREVIOUS, NEXT, and GOTO Buttons work the same as
  1072. their Menu counterparts.
  1073.  
  1074.                                      3-3
  1075.  
  1076. Edit Card
  1077.  
  1078.     Selecting the EDIT Card Button brings up the CARD LIST REQUESTER
  1079. (Pic.#3/Fig.#11). From this Requester you can Add, Edit, Delete, Duplicate and
  1080. Reorder Cards.
  1081.  
  1082.  
  1083.     This list on the left side of the CARD LIST REQUESTER contains the
  1084. names of all the Cards in the Deck. You can highlight a Card Name by clicking
  1085. on it in the list. The Buttons on the right side of the Requester will work
  1086. with the highlighted entry.
  1087.  
  1088. ADD
  1089.  
  1090.     The Add Button allows you to Add a new Card to the Deck. The New Card
  1091. will not contain any Objects. When you click this Button, the CARD EDITOR
  1092. REQUESTER will be displayed. This Requester is described later in the Chapter.
  1093.  
  1094. EDIT
  1095.  
  1096.     The Edit Button allows you to edit the currently highlighted Card. If
  1097. you double-click a CARD NAME, it will also edit the Card. In either case,
  1098. CanDo will go to the selected Card and display its CARD EDITOR REQUESTER.
  1099.  
  1100. DELETE
  1101.  
  1102.     The Delete Button deletes the highlighted Card. A Requester will ask
  1103. you if you really want to delete it. Be certain that you want to delete it.
  1104. The Card and all of its Objects are disposed of completely.
  1105.  
  1106. DUPLICATE
  1107.  
  1108.     The Duplicate Button makes a copy of the selected Card and Objects.
  1109. THE CARD EDITOR REQUESTER is then displayed for this Card. This allows you to
  1110. begin a new Card with a copy of the existing Objects.
  1111.     The list shows the Cards in the current order. The two large ARROW
  1112. Buttons allow you to reorder the Cards. By using these Buttons, you can move
  1113. the highlighted Card up and down through the list.
  1114.  
  1115.                                      3-4
  1116.  
  1117. Card Editor
  1118.  
  1119.     The CARD EDITOR REQUESTER (Pic.#3/Fig.#12) has a Field for the Card
  1120. Name and three Buttons for Scripts. You can change the Card Name by simply
  1121. changing the name in the field.
  1122.     The Card has three Scripts associated with it: Startup, AfterStartup,
  1123. and Leaving.
  1124.  
  1125. STARTUP
  1126.  
  1127.     The StartUp Script is performed before your Card's window opens and
  1128. before any other Objects on your Card are created. This is a good place from
  1129. which to initialize variables, load files, etc. Because the window has not yet
  1130. been opened, this Script cannot perform any sort of grphics commands.
  1131.  
  1132. AFTERSTARTUP
  1133.  
  1134.     In this Script, which is performed after your Card's window opens and
  1135. before (like Buttons) have been made, you may want to draw into your Card's
  1136. window, activate a particular text field, start a BrushAnimation or sound
  1137. playing, or perform other last-second steps before the user of your
  1138. application begins to interact with it.
  1139.  
  1140. LEAVING
  1141.  
  1142.     The Leaving Script is performed anytime you switch Cards. This Script
  1143. runs after your Card's Objects have been removed from the window. This is the
  1144. proper place to save any files that were changed on the Card that is ending,
  1145. before moving on to another Card or quitting entirely.
  1146.     NOTE: You cannot put any Card Movement Commands in the Leaving
  1147. Script.
  1148.  
  1149.                                      3-5
  1150.  
  1151.                                   Chapter 4
  1152.  
  1153.                                    Objects
  1154.  
  1155.     Lets start with some CanDo basics. Applicatons are comprised of a
  1156. Deck of Cards. You can have as many Cards in a Deck as you wish. Each Card in
  1157. the Deck has a Window. Like flash-cards, CanDo Cards are shown one at the
  1158. time.
  1159.     It's up to you how each Card looks. They can look similar to each
  1160. other or they can look completely diferent. CanDo gives you a lot of freedom
  1161. using the Amiga graphics and sounds.
  1162.     CanDo Objects, such as Buttons and Menus, are added to a Card
  1163. allowing you to interact with your application. Other Objects, like Timers,
  1164. allow you to set up events to control your application.
  1165.     The Objects on a Card make things happen in your application. The
  1166. Objects portion of the MAIN CONTROL PANEL (Pic.#3/Fig.#13) allows you to Add
  1167. and Edit the Objects.
  1168.  
  1169.                                      4-1
  1170.  
  1171.     While in DESIGN Mode, either the Add or Edit Button is highlighted.
  1172. This indicates the selected method of working with Objects. When ADD is
  1173. selected, clicking one of the Object's Button allows you to add an Object.
  1174.     Each Object has an EDITOR REQUESTER which alows you to define how the
  1175. Object appears and performs. While defining an Object, you give it a Name.
  1176. CanDo uses the Name to identify the object. Each Object on a Card must have
  1177. aunique Name. However, you can use the same Name for Objects on different
  1178. Cards.
  1179.     When EDIT is selected on the MAIN CONTROL PANEL, clicking on a
  1180. visible object (Buttons, Fields, Documents, Window Close Buttons or selecting
  1181. a Menu) brings up the EDITOR REQUESTER for the Object. Alternately, clicking
  1182. one of the Object Buttons in the Control Panel brings up an EDIT LIST
  1183. REQUESTER (Pic.#4/Fig.#14) displaying the Names, of the selected Object Type,
  1184. on the current Card. From this Requester you can Add, Edit, Delete, Duplicate
  1185. and Reorder Objects.
  1186.  
  1187.     The ADD Button works just as Add from the control panel. Selecting
  1188. the Add Button on the Control Panel is simply a shortcut to using the one on
  1189. this Requester.
  1190.  
  1191.     The EDIT Button allows you to edit the currently highlighted Object
  1192. in the list. Clicking this button brings up the EDITOR REQUESTER for the
  1193. Object Double clicking an entry automatically selects Edit.
  1194.  
  1195.     The DELETE Button deletes the highlighted Object. A REQUESTER will
  1196. ask you if you really want to delete the Object. Be certain that you want to
  1197. delete it. The Object is disposed of completely. It does not put it in the
  1198. Paste Buffer (see Object Menus).
  1199.  
  1200.     The DUPLICATE Button makes an exact copy of the selected Object. The
  1201. Object will be renamed in the same manner Workbench uses in duplicateing files
  1202. (ie. "copy of"). When you pres the Duplicate Button, the EDITOR REQUESTER will
  1203. be displayed with the copy of the Object. This allows you to easily create
  1204. similar Objects without starting from scratch each time.
  1205.     You can also Reorder the Objects. Visible objects, such as Buttons,
  1206. can beplaced on top one another. The list shows the order in which Cando adds
  1207. the Objects to the Card. Therefore, Objects that are lower in the list will
  1208. appear on top in the window. The MOVE OBJECT UP Button moves an object up in
  1209. the list and the MOVE OBJECT DOWN Button moves it down in the list.
  1210.  
  1211.                                      4-2
  1212.  
  1213. Object Scripts
  1214.  
  1215.     Objects make things happen bu performing Scripts. Each Object has at
  1216. least one Script that can be performed. Some can have more than one. The
  1217. Object's EDITOR REQUESTER contains either a button naming each Script or a
  1218. Scripts Button that will display the available Scripts. You can tell if a
  1219. Script already exists when the Button is black. Clicking the SCRIPTS Button
  1220. brings up the CanDo SCRIPT EDITOR.
  1221. Object Menus
  1222.  
  1223.     Clicking on any area of the MAIN CONTROL PANEL (it does not have to
  1224. be on a Button) allows you to access CanDo's menus using the Right Mouse
  1225. Button. Under the Objects Menus, you can select from Browse, Add, Edit, Copy,
  1226. and Paste. The Browse, Add, and Edit options perform in the same way as their
  1227. cooresponding Buttons on the MAIN CONTROL PANEL. The Menu equivalents provide
  1228. convenience in that the Amiga Shortcut Keys of AMIGA...B, AMIGA...A, and AMIGA
  1229. E can be used to select them.
  1230.  
  1231.     The remaining optins are Copy and Paste. These Options allow you to
  1232. Copy an Object into a Past Buffer, and to Paste it onto another Card.
  1233.     Selecting COPY allows you to copy an Object using two methods. First
  1234. you can click on a visible Object on your card. After doing so, the previous
  1235. Paste Buffer is replaced with the selected Object. Selecting one of your Menu
  1236. Item copies all Menu Items and Subitems from the selected Menu into the Paste
  1237. Buffer.
  1238.  
  1239.     For the second method, after selecting Copy from the Objects Meny,
  1240. you click on one of the Object Buttons in the Main Control Panel. This
  1241. displays the list of Object Buttons in the Main Control Panel. Double clicking
  1242. an Object name, or clicking the Copy Button puts the Object into the Paste
  1243. Buffer.
  1244.  
  1245.     Selecting PASTE from the Objects Menu adds the Object to the current
  1246. Card. When Paste is selected, the Object's EDITOR REQUESTER will be displayed.
  1247. You can then modify the Object before selecting OK, or select CANCEL to abort
  1248. the Paste operation.
  1249.  
  1250.                                      4-3
  1251.  
  1252. CanDo File Requester
  1253.  
  1254.     At various times, CanDo will display its FILE REQUESTER
  1255. (Pic.#4/Fig.#15) requiring you to specify the name and location of a file.
  1256.     A File specification has two parts: the Path and Filename. The Path
  1257. Field shows where the file is, and the File Field shows the name of the file.
  1258.     The smaller List on the left sets the Path. You can use it to locate
  1259. the Path using Drawers, Disks, Phusical Devices, and Assignments. By default,
  1260. the small list contains the list of Drawers or Sub-Directories in the
  1261. directory indicated by the Path. Clicking one of its entries, sets the Path to
  1262. the indicated directory.
  1263.     Clicking the DRAWER Button changes its name to Disks and the small
  1264. list will display the available Disk Volumes. Clicking the DISKS Button
  1265. changes it to Physical. The list now displays the available physical devices.
  1266. Not all of these can be used for accessing files! Clicking the PHYSICAL Button
  1267. changes it to Assign. Now the list shows the available assignments. (See your
  1268. Amiga documentation for setting these). Finally, clicking the ASSIGN Button
  1269. sets the list back to Drawer.
  1270.     Clicking the PARENT button changes the current Path to the parent
  1271. directory if there is one.
  1272.     The lager List on the right, allows you to select a File Name.
  1273. Clicking an entry puts the name in the File field. Double-clicking an entry
  1274. selects the name as though you clicked OK.
  1275.     Sometimes, the FILE REQUESTER will have an additional preview button
  1276. on it. For example: when you are suppose to find a picture file, there will be
  1277. an additional button SHOW IT!. Clicking it allows you to see the currently
  1278. selected file. When finding a sound file, the HEAR IT! Button allows you it
  1279. listen to it.
  1280.     Clicking OK selects the current file indicated in the Path and File
  1281. Fields. If the File needs to be a specific type, CanDo will verify it and
  1282. display an Error Requester when it is wrong.
  1283.  
  1284.     While using the various Requesters within CanDo, you have the option
  1285. of selecting Cancel or Ok. Ok accepts any changes you have made in the
  1286. Requester. Cancel causes CanDo to forget any changes. Selecting either Cancel
  1287. or Ok returns you to the previous Requester if there was one.
  1288.  
  1289.                                      4-4
  1290.  
  1291.                                    Buttons
  1292.  
  1293.     A Button is an area in a window that can be clicked with the Mouse
  1294. Pointer. When clicked, specified actions can be performed. CanDo allows an
  1295. unlimited number of Buttons ot be defined on the Screen.
  1296.     Selecting ADD in the OBJECTS PROTION OF THE MAIN CONTROL PANEL allows
  1297. Objects to be aded to your application. If you click the BUTTON Button on the
  1298. same panel the ADD NEW BUTTON REQUESTER will come up, direction you to locate
  1299. the Origin Point of the New Button with your Mouse. Now click the OK Button.
  1300. The ADD NEW BUTTON REQUESTE will be lowered revealing your full Screen. Next
  1301. move your Mouse, positioning th Pointer at a location on the Screen where you
  1302. want a Button. Now click the LEFT MOUSE Button to set the Origin Point. Your
  1303. Mouse now controls the shape and size of a rectangle representing a Button
  1304. area. Move the Mouse in any direction you choose, adjusting the rectangle
  1305. until you are satisfied with its size. If you don't like the Button for some
  1306. reason, press the ESC key and start over. If the Button is to your liking,
  1307. click the LEFT MOUSE Button again and The BUTTON EDITOR REQUESTER
  1308. (Pic.#5/Fig.#16) will be displayed.
  1309.     The BUTTON EDITOR REQUESTER allows you to edit the unique information
  1310. about each button. It displays the Button's Name, Origin, Button Style, Border
  1311. and Highlight Styles, and the avaiable Scripts. The origin coordinates of the
  1312. Button, in X (horizontal) and Y (vertical) format, will have been entered for
  1313. you automatically.
  1314.  
  1315.                                      4-5
  1316.  
  1317. Name
  1318.  
  1319.     The Name is a group of characters identifying the button. The same
  1320. name can not be used for more than on object on a card. The button isgiven a
  1321. default name "Unknown". However, you probably will want to name it something
  1322. that is meaningful to you. The Name can include any charcter. It has a maximum
  1323. length of 20 characters. When you press RETURN, CanDo will verify that the
  1324. name i unique.
  1325.  
  1326.  
  1327. Origin
  1328.  
  1329.     The Origin always indicates the location of the upper left corner of
  1330. a Button. The Horizontal value indicates the distance in pixels from the left
  1331. edge of the Window. The Vertical value indicates the number of pixels down
  1332. from the top of the Window. The present values can be changed by clicking in
  1333. these Fields and typing in new values with the keyboard.
  1334.     You can also set these values using the Mouse. First click the Origin
  1335. Button, and the ADD BUTTON REQUESTER will be lowered. Your Mouse now controls
  1336. the position of a recangle representing the Button Area. Now move the
  1337. rectangle where you want the Button to be. If, however you choose not to
  1338. change your present Button you can return to the BUTTON DEFINITION REQUESTER
  1339. by pressing the ESC key. When the new location looks good just click the LEFT
  1340. MOUSE Button and the BUTTON DEFINITION REQUESTER will reappear.
  1341.  
  1342.                                      4-6
  1343.  
  1344. Style
  1345.  
  1346.     CanDo has three Button styles: Area, Text and Image. When adding a
  1347. Button, a rectangular area is defined. This area represents the "Hit Area" for
  1348. an Area Button. Area Buttons do not have an image or text representing the Hit
  1349. Area. However, they can be placed over images in the Window.
  1350.     In addition to Area Buttons, CanDo allows you o use Text and Image
  1351. Buttons for representing Image and Irregularly Shaped Buttons. These Buttons
  1352. are described in greater detail in the Text and Image sections of this manual.
  1353.     The check mark in the BOX next to "Area" indicates the current Button
  1354. is an Area Button. Each Button style has a Requester containing unique
  1355. information for its particular requirements. Clicking the BOX next to the
  1356. indicated style, brings up the appropriate Requester and changes the Button
  1357. style. Clicking CANCEL, aborts this process.
  1358.  
  1359.     Clicking on the BOX next to "Area" brings up a requester cdontaining
  1360. information baout the size of the Area Button.
  1361.     This requester allows you to view or change the Width and Height of
  1362. the Area Button. These values can be changed using the Keyboard. However, they
  1363. can also be set using the RESIZE ON WINDOW Button (Pic.#2/Fig.#17). Clicking
  1364. on this Button lowers the MAIN CONTROL PANEL. Your Mouse is now controlling
  1365. the lower right corner of a rectangular box. The upper left corner is
  1366. stationary on the screen. This corner indicates the Origin of the Button. The
  1367. rectangular corner, and pressing the LEFT MOUSE Button a new area for the
  1368. button is defined. Pressing ESC, returns to the AREA BUTTON REQUESTOR without
  1369. modifying the Width and Height values (Pic.#4/Fig.#18).
  1370.  
  1371.                                      4-7
  1372.  
  1373. Border
  1374.  
  1375.     An Area or Text Button can have a Border around its Hits Area. There
  1376. are six Border Styles from which to choose. The default Border Style, Outline,
  1377. is shown in the BUTTON DEFINITION REQUESTER. By clicking on the BORDER Button
  1378. the BORDER SELECTOR (Pic.#5/Fig.#19), will be displayed.
  1379.     The BORDER SELECTOR displays the border styles from which to select.
  1380. The selected syle will have a Black Hit Area. Clicking the Hit Area of the
  1381. desired button selects the matching style.
  1382.     The bottom row contains a Cancel Button, two COLOR SELECTORS, and an
  1383. OK Button. The two Color Selectors change the colors used in rendering the
  1384. buttons border. The colors can be selected by using the two arrows on the
  1385. Color Selectors or by clicking one of the available colors at the bottom of
  1386. the Screen. The selected color is shown in the active Color Selector. Clicking
  1387. on one of the Color Selectors makes it active. The sample buttons on the
  1388. Border Selector depict the use of these colors.
  1389.  
  1390.  
  1391. Highlight
  1392.  
  1393.     When you click on a Button that you have made with CanDo, the Button
  1394. area can change to the existing color's Complementary color, or Outline the
  1395. area, or do neither. The default Highlight Style, Complement, is shown in the
  1396. ADD BUTTON REQUESTER. By clicking on the HIGHLIGHT Button the HIGHLIGHT
  1397. SELECTOR (Pic.#6/Fig.#20) will be shown.
  1398.     The three Highlight Styles: None, Outline, and Complement are shown
  1399. in this requester. Clicking on the associated button sets its Hit Area to
  1400. Black.
  1401.  
  1402.                                      4-8
  1403.  
  1404. Button Scripts
  1405.  
  1406.     There are four types of events that can occur by using a Mouse
  1407. Button. They are Click, Drag, Release, and Double Click. Each of these events
  1408. can have a Script associated with them. A script is simply a set of
  1409. instructions to perform.
  1410.  
  1411. CLICK
  1412.  
  1413.     Click events happen when the LEFT MOUSE Button is pressed while the
  1414. mouse pointer is over the Button. This type of event is useful for providing
  1415. immediate response to the mouse.
  1416.  
  1417. DRAG
  1418.  
  1419.     Drag events occur as the LEFT MOUSE Button is held down and moved
  1420. over the button's Hit Area. This is an uncommon type of button usage. However,
  1421. these movement events can be used for tracking mouse movements in applications
  1422. such as paint programs.
  1423.  
  1424. RELEASE
  1425.  
  1426.  
  1427.     Release events occur when the LEFT MOUSE Button is pressed and
  1428. released while over a button. This is the most common button application. By
  1429. delaying until the button is released, the user can decide to move the pointer
  1430. off the button, thus avioding an unwanted action.
  1431.  
  1432. DOUBLE-CLICK
  1433.  
  1434.     Double-Click events happen when the LEFT MOUSE Button is clicked
  1435. quickly two times. The Amiga Preferences allows a user to adjust the time
  1436. delay used in determining a Double-Click. This type of event is used to insure
  1437. that the user did not inadvertently press a button. The Icons on Workbench
  1438. work in this manner.
  1439.  
  1440.                                      4-9
  1441.  
  1442. Text Button
  1443.  
  1444.     Like an Area Button, a Text Button has a rectangular Hit Area.
  1445. However, CanDo will automatically display a text message in the hit area. You
  1446. specify the text massage, the font and point size, color, and style. The text
  1447. is simply characters that you want to represent the action performed by the
  1448. button. It can use any font avaiable in your "Fonts:" directury and can also
  1449. use a varity of Text Styles, to enhance its appearance. Like an Area Button, a
  1450. Text Button can have a Border around its Hit Area.
  1451.     An Area or Image Button can be changed to a Text Button by clicking
  1452. in the BOX next to "Text" in the BUTTON DEFINITION REQUESTER. You can change
  1453. the style of a Button as many times as you wish. When you have made your final
  1454. choice there is one important thing to remember about this process: each Style
  1455. has unique style information that must be saved. That information is saved
  1456. only when you click OK on the Buton Definition Requester.
  1457.     The TEXT BUTTON DEFINITION REQUESTER (Pic.#6/Fig.#21) is displayed
  1458. when the BOX next to "Text" is selected. A window on your screen displays the
  1459. appearance of the text message.
  1460.     The TEXT BUTTON DEFINITION REQUESTER allow you to select the font and
  1461. point size, the Text Style, the colors used, and the text message to use in
  1462. the button. Notice that you don't set the size of a text button. Its size is
  1463. determined automatically by the size of the message in the selected font.
  1464.  
  1465.  
  1466. Selecting a Font and Point Size
  1467.  
  1468.     The available fonts in your Fonts: directory are shown in a list. A
  1469. font can be selected bu clicking on its name with your mouse pointer. If you
  1470. have more fonts than can be displayed in the list, the slider allows you to
  1471. scroll through the list. The currently selected font is shown below the list.
  1472. The point sizes available for that font are shown in the list next to the
  1473. fonts. The selected size is shown below its list. When the font or size is
  1474. selected, the sample text will be updated to show its appearance.
  1475.     CanDo uses the current Fonts: directory. Some of you may have more
  1476. than one Font directory. With applications such as Paint programs, you can
  1477. change directories while working on a project. This is because the font is
  1478. only used while you are rendering text to the screen. Afterwards, it is not
  1479. needed anymore and you can change font directorires.
  1480.  
  1481.                                      4-10
  1482.  
  1483.     Because CanDo uses the selected font when displaying a button, all
  1484. fonts used by CanDo should be in the currently assigned Fonts: directory. If
  1485. you change the fonts in this directory, remember to run FixFonts before using
  1486. them. If the selected font can not be used, the system's default font will be
  1487. used.
  1488.  
  1489.  
  1490. Selecting Text Style
  1491.  
  1492.     The Amiga operation system supports Plain, Bold, Italic and Underline
  1493. text style. CanDo provides enhanced styles of Embossed, Outlined, Shadowed,
  1494. and Ghosted.
  1495.  
  1496.  
  1497.     Selecting Plain deselects all other Text Styles. Bold, Italic, and
  1498. Underline can be used with each other along with one of CanDo's enhanced
  1499. styles. Only one enhanced can be used at a time. The Sample text shows the
  1500. results of the selected styles.
  1501.  
  1502.  
  1503. Selecting Text Colors
  1504.  
  1505.     The TEXT SELECTOR has three COLOR SELECTORS. The first one is the
  1506. primary color. It is used with all styles for depicting the text. The other
  1507. two Color Selectors are used with the enhanced styles. The colors available in
  1508. the Color Selectors are the ones currently used in your screen. Different
  1509. color combinations provide different effects. Playing around with different
  1510. styles and colors will give you the feel of how to use them.
  1511.  
  1512.  
  1513. Selecting Text
  1514.  
  1515.     The Text defaults to the same name used for the button. However, it
  1516. doesn't have to be the same. The text can be changed using the keyboard.
  1517. Spaces at the beginning and the end of the text can be used to make the button
  1518. larger.
  1519.     Selecting CANCEL does one of two things. If the Button was previously
  1520. of a different Style the original Button Style will berestored. If it was
  1521. already a Text Button, any changes made will be forgotten. Selecting OK
  1522. accepts any change.
  1523.  
  1524.                                      4-11
  1525.  
  1526. Image Button
  1527.  
  1528.     Image Buttons have a small picture for a Hit Area. A "DPaint" style
  1529. Brush is needed to define the picture for an Image Button. Most paint packages
  1530. allow a portion of a oucture to be clipped and saved in a file. These small
  1531. pictures are called Brushes. CanDo allows a Brush to beused as an Image
  1532. Button. When a Brush is clipped from a picture, the back ground color is
  1533. transparent. While the Brush is rectangular, the Image appears to exclude this
  1534. one color. CanDo supports this technique in utilizing the Brush as a Button.
  1535.     While the background color is drawn, it is not included in the Hit
  1536. Area. This means that when the mouse is clicked on the background portion of
  1537. the image, the button is not activated. This allows irregular shapes, such as
  1538. arrows, to be used without including the area around the image as a Hit Area.
  1539.     An Image Button is created by clicking in the BOX next to "Image" in
  1540. the BUTTON DEFINITON REQUESTER. This will display the IMAGE BUTTON REQUESTER
  1541. (Pic.#6/Fig.#22).
  1542.     The IMAGE BUTTON REQUESTER allows you to select a "DPaint" style
  1543. brush file for the image. The Image Name Button indicates the Name of the
  1544. Brush File. By clicking the Button, you can locate the file using CanDo's FILE
  1545. REQUESTER.
  1546.     This Requester has a Button called "Show It!" The Show It Button
  1547. loads the Brush File and displays it in a Window on your Screen. This allows
  1548. you to see what the brush looks like. Don't be alarmed if a large brush is not
  1549. completely visible in the Window. The purpose of this feature is for you to
  1550. visually verify its appearance. If it is not a valid Brush File, CanDo will
  1551. display an Error message. If the Brush does not use the same display mode or
  1552. color palette as your screen, it might not appear as you expect. Keep in mind
  1553. that the Amiga can use only one display mode and one color palette on a single
  1554. screen. However, with some planning, you shouldn't have too much trouble
  1555. getting predictable results.
  1556.  
  1557.                                      4-12
  1558.  
  1559.     CanDo allows you to use the shape of a brush as the hit area, without
  1560. using it's image. Clicking the BOX next to "Use Shape Only" toggles this
  1561. feature. By selecting this feature, the non transparent colors in the brush
  1562. image define the hit area of the button. However, the image of the brush is
  1563. not rendered on the screen. This feature allows irrgularly shaped buttons to
  1564. be used without changing the image on the screen.
  1565.     As with the AREA and TEXT BUTTON DEFINITION REQUESTER, clicking
  1566. CANCEL aborts a style change or of any changes made in the IMAGE BUTTON
  1567. DEFINITION. Clicking OK accepts changes and returns to the BUTTON DEFINITION
  1568. REQUESTER.
  1569.  
  1570.  
  1571. Alternate Image Button
  1572.  
  1573.     An Image Button, that is not using the "Use Shape Only" feature, has
  1574. an additional Highlight option. Clicking on the BUTTON in the "Highlight"
  1575. section of the BUTTON DEFINITION REQUESTOR, displays the HIGHLIGHT SELECTOR
  1576. (Pic.#7/Fig.#23).
  1577.     However, this time the additional option, Alternate Image is
  1578. available. Clicking on this Buton displays CanDo's File Requester, allowing
  1579. you to locate the Brush File to use as the Alternate Image. The Show It Button
  1580. allows you to preview the Image. It is suggested that the Brush used for the
  1581. Alternate Image be of the same dimensions as the Brush used for the Image
  1582. Button. Otherwise, portions of an image will not be cleared when the image
  1583. changes.
  1584.  
  1585.                                      4-13
  1586.  
  1587.                                    Windows
  1588.  
  1589.     A Card always has a Window. The Window Object allows you to customize
  1590. each Card's Window. You can change the resolution, number of colors, or
  1591. provide a background image. You can also have close, resize and depth buttons.
  1592. Several other options allow you to tailor the appearance of the Window.
  1593.     Selecting the WINDOW object from the MAIN CONTROL PANEL, brings up
  1594. the WINDOW EDITOR REQUESTER (Pic.#7/Fig.#24).
  1595.     The Window Editor allows you to specify a Title for the Window. Along
  1596. the right side of the WINDOW EDITOR REQUESTER, are four Buttons: Dimension,
  1597. Window Colors, Objects, and Options. Each of these Buttons opens a Requester
  1598. allowing you to control specific aspects of the Window. The Window can have
  1599. four scripts associated with it: CloseButton, Resize, Deactivate, and
  1600. Activate.
  1601.  
  1602.  
  1603. Window Title
  1604.  
  1605.     This Field allows you to specify a Title for the Window Title Bar. If
  1606. the Window Title is empty, (you can do this easily by clicking in the Field
  1607. and pressing the AMIGA...X) no Title will appear. In addition, if you do not
  1608. specify a close button, depth buttons, and dragbar (see Window Objects) and
  1609. the Window Title is empty, the Window will not have a Title Bar.
  1610.     If you want to insure that you have a Title Bar, yet you don't want
  1611. to have a Title, put a space in the Window Title Field.
  1612.  
  1613.                                      4-14
  1614.  
  1615. Dimension
  1616.  
  1617.     Clicking the DIMENSION Button on the WINDOW EDITOR, brings up the
  1618. DIMENSION REQUESTER (Pic.#1/Fig.#2).
  1619.     The DIMENSION REQUESTER allows you to specify the Window size, and
  1620. number of colors. Alternatively, you can specify a Background Image. In
  1621. addition, you can specify an initial position.
  1622.  
  1623.  
  1624. Display Mode
  1625.  
  1626.     When providing the Width and Height, CanDo automatically determines
  1627. the Display Mode. The Amiga Display modes are Low-Resolution, Extra
  1628. Half-Bright, Hold and Modify (HAM), and High-Resolution.
  1629.  
  1630.  
  1631.  
  1632.  
  1633.     Widths up to 320 can be Low-Resolution, Extra Half-Bright, or HAM.
  1634. The  Display mode is determined by the number of colors. If you choose 32
  1635. colors or less you will be in Low-Resolution Mode. Choosing 64 colors produces
  1636. Extra Half-Bright Mode. Finally, 4096 colors gives you HAM Mode.
  1637.     Widths greater than 320 requires High-Resolution Mode and can have a
  1638. maximum of 16 colors. Interlace is usd with Heights greater than 200 (256 on
  1639. PAL Amigas). On the left side of the DIMENSION REQUESTER, four common screen
  1640. Sizes can be selected. Clicking on the appropriate Button sets the Width and
  1641. Height to the indicated values.
  1642.  
  1643.  
  1644. Position
  1645.  
  1646.     The X and Y values are the initial position of the Window. Most
  1647. application will use default values of 0 (Zero). If the Window has a dragbar
  1648. (see Window Objects), it can be repositoned with the mouse.
  1649.     The X value is only used when the Window is opened on Workbench (see
  1650. Window Options). It indicates the initial Horizontal position of the Window.
  1651. The Y value indicates the initial Vertical position. If the Window is opened
  1652. on Workbench, it will be used for the vertical position of the window.
  1653. Otherwise, it will be the initial vertical position of the new screen.
  1654.  
  1655.                                      4-15
  1656.  
  1657. Picture Window
  1658.  
  1659.     Clicking the PICTURE WINDOW Button brings up the CanDo's FILE
  1660. REQUESTER. The specified Image will be used as background image for the
  1661. Window. The Window's size and number of colors will be determined by the
  1662. picture. When a Picture Window has been selected, the Picture Window Button
  1663. will be highlighted. Changing the Width or Height values, or Number of Colors
  1664. will de-select the Picture Window.
  1665.     Clicking OK or CANCEL on the DIMENSION REQUESTER returns to the
  1666. WINDOW EDITOR.
  1667.  
  1668.  
  1669. Window Colors
  1670.  
  1671.     Clicking the WINDOW COLORS Button on the WINDOW EDITOR bring up the
  1672. COLOR REQUESTER (Pic#7/Fig.#26). It allows you to change the color used for
  1673. the Window's Background, Border and Text. These values can be set to the Color
  1674. number you want to use.
  1675.  
  1676. BACKGROUND COLOR
  1677.     The Background Color is the initial color of the Window. If you
  1678. specify a PICTURE WINDOW in the WINDOW DIMENSION REQEUSTER, this value will
  1679. not be used.
  1680.  
  1681. BORDER COLOR
  1682.     This is the color for drawing the Window's border and Title Bar. If
  1683. the Window does not have a border or Title Bar (see Window Options), this
  1684. value will not be used.
  1685.  
  1686. TEXT COLOR
  1687.     This color is used for the Window's Title. If the Window does not
  1688. have a Title Bar, it will not be used.
  1689.     Clicking OK or CANCEL will retur to the WINDOW EDITOR.
  1690.  
  1691.                                      4-16
  1692.  
  1693. Window Objects
  1694.  
  1695.     Clicking the OBJECTS BUTTON on the WINDOW EDITOR brings up the OBJECT
  1696. REQUESTER (Pic.#1/Fig.#3).
  1697.     This Requester allows you to specify optional Window Objects. There
  1698. are, from left to Right: Close Button, Depth Buttons, Dragbar, and Resize
  1699. Button. Click on the BUTTONS of your choice. The selected object will be added
  1700. to your Window.
  1701.     The Close Button object allow a Close Button script to be performed
  1702. when clicked. The Depth Buttons allow the Window to be pushed to the back or
  1703. brought to the front. The Dragbar allow the Window to be dragged. The Resize
  1704. Button allows the size of the Window to be adjusted. Note: If a Resize Script
  1705. exists, the Script is performed whenever the Window is resized.
  1706.     The Depth Buttons, Dragbar and Resize Button are most useful when
  1707. used with a Workbench Window. While they are not restricted to the Workbench
  1708. Window, they are used for working with more than one Window on a screen.
  1709.     Selecting OK or CANCEL return to the WINDOW EDITOR.
  1710.  
  1711.  
  1712. Window Options
  1713.  
  1714.     Clicking the OPTIONS Button on the WINDOW EDITOR, brings up the
  1715. WINDOW OPTIONS REQUESTER (Pic.#9/Fig.#28). This Requester allows you to select
  1716. various options effecting the Window. The default Options are shown below.
  1717.  
  1718.                                      4-17
  1719.  
  1720.     Clicking a Button changes the option. Each Buttons toggles between
  1721. two choices. The following image shows the alternative to the default Options
  1722. (Pic.#9/Fig.#29).
  1723.  
  1724. VISIBLE BORDERS
  1725.     The Window has an optional borde. When visible, a box is drawn around
  1726. the Window using the color specified in Window Colors. If the border is
  1727. invisible, the box is not drawn.
  1728.  
  1729. BACKDROP MODE
  1730.     A backdrop Window means the Window is attached to the screen. The
  1731. window will not have a Window Title and none of the Window Objects will be
  1732. attached. If this is a Workbench Window, the window cannot be positioned on
  1733. top of other windows nor can it be moved around. When the Window is opened on
  1734. a Custom Screen, you will have access to the Screen Title Bar allowing the
  1735. Screen to be lowered using the Mouse.
  1736.  
  1737. BRING WINDOW TO FRONT
  1738.     This option effects whether the window is visible when it is opened.
  1739. On a Workbench Window, the Window is allowed to be opened in front of, or
  1740. behind any Windows on the screen. On a Custom Window, it affects whether the
  1741. Screen is in front of or behind other Screens. You can use the WindowTo and
  1742. ScreenTo Commands to change the position of the Window or Screen.
  1743.  
  1744.                                      4-18
  1745.  
  1746. WINDOW ACTIVE
  1747.     The Amiga can only have one active window at a time. This Window
  1748. receives keyboard input, and its menus are available to be used. The Window
  1749. Activate option allows you to control whether your Window is the Active Window
  1750. when it is first opened. Most of the time you will want it to be Active.
  1751. However, you may wish to make a CanDo application that is started from a CLI
  1752. and has a Status Window on Workbench. If you want to be able to continue
  1753. typing in the CLI, without reactivating it, then you do not want your CanDo
  1754. Window to become Active.
  1755.  
  1756. WORKBENCH WINDOW
  1757.     This option tells CanDo to try to open the Window on Workbench. To do
  1758. so, the Window must use 2 or 4 colors. In addition, if your Workbench Screen
  1759. is non-interlace, the Window height can not be greater than 200 (256 on PAL
  1760. Amigas). If the Window can not be opened on Workbench, CanDo will open a new
  1761. screen.
  1762.     Clicking OK or CANCEL returns to the WINDOW EDITOR.
  1763.  
  1764.  
  1765. Window Scripts
  1766.  
  1767.     The Window has four scripts that can be performed. The CloseButton,
  1768. Resize, Deactivate, and Activate Scripts can be edited by clicking the
  1769. appropriate Button on the WINDOW EDITOR.
  1770.  
  1771.  
  1772.  
  1773. CLOSEBUTTON
  1774.     By enabling the CloseButton in Window Objects, the Window will have a
  1775. CloseButton in the upper left corner. This script is performed when the button
  1776. it is clicked on.
  1777.  
  1778. RESIZE
  1779.     When the Window is resized, you may need to redraw your Window.
  1780. Buttons, Fields, and Documents are redrawn automatically. However, all other
  1781. imagery is not. This script can contain commands to redraw the imagery in the
  1782. Window when it is resized.
  1783.  
  1784. DEACTIVATE
  1785.     When your Window is Active, and you click in any other Window, the
  1786. Deactivate Script is performed.
  1787.  
  1788. ACTIVATE
  1789.     When a user re-activates the Window this script is performed. The
  1790. Deactivate and Activate scripts can be used to pause an activity while the
  1791. another application is being used.
  1792.  
  1793.                                      4-19
  1794.  
  1795.                                     Menus
  1796.  
  1797.     CanDo allows you to create menus for your applications. Most likely
  1798. you're familiar with using the menus provided in most of the software on your
  1799. Amiga. CanDo lets you create Amia menus with the features you have become
  1800. accustomed to, and features such as Menu Images that even progessional
  1801. software seldom utilizes.
  1802.  
  1803.  
  1804. Features Provided in CanDo Menus
  1805.  
  1806.     * Multiple Menu Titles.
  1807.     * Menu Items and Subitems.
  1808.     * Shortcut keys.
  1809.     * Stylized Text Fonts.
  1810.     * Menu Images.
  1811.     * Alternate Text and Alternate Image Highlighting.
  1812.  
  1813. Menu Components
  1814.  
  1815.     Menu Titles are visible on the Title Bar of a window when the right
  1816. mouse button is pressed. They are text characters providing the context and
  1817. location of the available menus. CanDo allows you to have as many Menu Titles
  1818. as can be displayed on the Title Bar. When the Mouse Pointer is positioned
  1819. over a Menu Title with the RIGHT MOUSE Button pressed, its Menu Iterms become
  1820. visible.
  1821.     Each Menu Title will have at least one Menu Item. The Menu Items are
  1822. the selectable list of Text or Image entries associated with a Menu Title. A
  1823. Menu Item can have Menu SubItems. They become visible when the mouse is
  1824. positioned over the Meny Item. Like Menu Items, they can either be represented
  1825. by Text or an Image. Each Menu Item and Subitem can have a script that is
  1826. executed when it is selected. In addition, they can have a Shortcut key that
  1827. causes its script to be executed as though it had been selected using the
  1828. mouse.
  1829.  
  1830.                                      4-20
  1831.  
  1832. Adding and Changing Menus
  1833.  
  1834.     Menus are added and edited through Requesters. Unlike Buttons and
  1835. Fields, it makes no difference whether "Add" or "Edit" is selected in the
  1836. OBJECTS CONTROL PANEL. When the MENU Button is selected from the Objects
  1837. Control Panel, the MENU EDITING SELECTOR (Pic.#8/Fig.#30) is displayed.
  1838.     The MENU EDITING SELECTOR allows the creation, deletion, reordering,
  1839. and renaming of the Menu Titles. It also provides access to the Menu Items for
  1840. each Menu Title.
  1841.     If you have two or more Menu Titles, The Movement Arrows allow you to
  1842. chane their order. The top entry will appear at the far left side of the MENU
  1843. BAR. The bottom entry will appear on the right side.
  1844.     Selecting ADD or EDIT brings up the MENU TITLE EDITOR
  1845. (Pic.#8/Fig.#31). It contains the Menu Title. The Menu Title is the text that
  1846. appears on the Title Bar.
  1847.     When EDIT is selected the Menu Title Editor will contain the name of
  1848. the selected Menu Title. If you want to re-name it, simply change the name in
  1849. the Field.
  1850.     Selecting CANCEL returns to the MENU TITLES SELECTOR. Selecting OK
  1851. brings up the MENU ITEM EDITOR to the Menu Title.
  1852.  
  1853.                                      4-21
  1854.  
  1855. Menu Items
  1856.  
  1857.     The MENU ITEMS SELECTOR works in the same manner as the MENU TITLES
  1858. SELECTOR. Menu Items are created, deleted, reordered using this Selector. A
  1859. Menu Title must have at least one Menu Item. If you don't Add one before
  1860. selecting EXIT the Menu Title will not be created. Should you ever delete all
  1861. Menu Items from a Menu Title, the Title will be removed.
  1862.     Choosing EDIT or ADD brings up the MENU ITEM EDITOR REQUESTOR
  1863. (Pic.#10/Fig.#32). Add allows you to create a new Menu Item. Edit allows you to
  1864. change on existing one.
  1865.     The MENU ITEM EDITOR REQUESTER allows you to define and later modify
  1866. the features of a Menu Item. From this Requester, you specify the Object Name,
  1867. Highlighting Style, Meny Style, and a script to be performed when it is
  1868. selected. You can optionally define a Shortcut Key and menu Subitems.
  1869.  
  1870.  
  1871. Menu Item Name
  1872.  
  1873.     As with other Objects, the Object Name here provides a unique group
  1874. of characters identifying the Menu Item. It is the name that will be shown in
  1875. the MENU ITEMS SELECTOR for the Menu Title.
  1876.  
  1877.  
  1878. Menu Style
  1879.  
  1880.     Menu Items can be represented by an Image or Text. The check mark in
  1881. the BOX next to "Text" indicates it as the default style. Clicking on this BOX
  1882. brings up the MENU TEXT DEFINITION REQUESTER. It works the same way as the
  1883. TEXT BUTTON DEFINITION REQUESTER. The Text field defaults to the Menu Item
  1884. Name. However in can be altered to whatever you like.
  1885.     Clicking on the BOX next to "Image" brings up CanDo's File Requester.
  1886. It allows you to specify the "DPaint" style Brush you want to use as the Menu
  1887. Image. Clicking the SHOW IT Button will show you a representation of the Image
  1888. on your Screen. As with all brush images, it uses the Screens' resolution and
  1889. palette.
  1890.  
  1891.                                      4-22
  1892.  
  1893. Menu Highlight
  1894.  
  1895.     With the RIGHT MOUSE Button depressed and the Mouse Pointer
  1896. positioned over a Menu Item, it will be Highlighted. The Highlighting style is
  1897. indicated in the Button below "Highlight" in the MENU ITEM DEFINITON
  1898. REQUESTER. Clicking the HIGHLIGHT Button brings up the MENU HIGHLIGHTING
  1899. REQUESTER. This Requester allows you to select from the available styles.
  1900.     Both Text and Image items can have highlighting styles of None,
  1901. Outline, and Complement. The Default style is Complement. These styles work
  1902. the same way as their Button Object counterparts.
  1903.  
  1904.  
  1905.  
  1906.     Text Menus have the additional Highlight Style of Alternate Text.
  1907. Simply type the text into the field in the Alternate Text area of the
  1908. Highlight requestor. The Alternate Text uses the same font and style as the
  1909. Primary Text.
  1910.     Image Menus have the additional Highlight Style of Alternate Image.
  1911. Clicking on the ALTERNATE IMAGE Button brings up CanDo's FILE REQUESTER
  1912. allowing you to select a "DPaint" style brush file. While it is not necessary,
  1913. it is suggested that the brush be of the same dimensions as the first Image
  1914. used. If they are not, the image will not erase each other completely when
  1915. highlighted and un-highlighted or selected and released.
  1916.  
  1917.  
  1918. Selected Script
  1919.  
  1920.     A Menu Item has a single script that is performed when it is
  1921. selected. Clicking on the SELECTED Button in the Script area brings up the
  1922. CANDO EDITOR allowing you to edit the Script.
  1923.     The Menu Item is selected by pressing the RIGHT MOUSE Button and
  1924. positioning the Mouse Pointer over the Item then releasing the Button.
  1925.  
  1926.  
  1927. Shortcut Key
  1928.  
  1929.     CanDo allows you to assign a SHORTCUR Key to a menu item. All you
  1930. have to do is type a single character in the "Shortcut Key" Field. CanDo will
  1931. display the Shortcut Key symbol on the right side of the Menu Item. Pressing
  1932. the RIGHT AMIGA Button and the SPECIFIED Key, performs the Menu Item's
  1933. selected script as though it had been selected using the Mouse.
  1934.  
  1935.                                      4-23
  1936.  
  1937. Menu Sub-Items
  1938.  
  1939.     A Menu Item can have a group of selectable Menu Sub-Items. By
  1940. depressing the RIGHT MOUSE Button while the Mouse Pointer is positined over
  1941. the Menu Item, the Menu Sub-Items become visible. The Mouse Pointer can then
  1942. bepositioned over the Sub-Item you want. When the Right Mouse Button is
  1943. released, the Sub-Item is Selected.
  1944.     To Add or Edit an existing Menu Item's Sub-Items click on the BOX
  1945. next to "Sub-Item", This brings up the MENU SUB-ITEM SELECTOR. It works
  1946. identically to the MENU ITEM SELECTOR. Selecting ADD, brings up the MENU
  1947. SUB-ITEM EDITOR REQUESTER (Pic.#10/Fig.#33).
  1948. It allows you to define the Menu Sub-Item. This definition process is the same
  1949. as the MENU ITEM EDITOR REQUESTER. The only exception is that Menu Sub-Items
  1950. can not have additional Sub-Items. This is a restriction enforced by the Amiga
  1951. Operating System.
  1952.     After a menu Sub-Item is Added or Edited, clicking on OK will return
  1953. you to the MENU SUB-ITEM SELECTOR. Exiting the Menu Sub-Item Selector returns
  1954. to the MENU ITEM EDITOR REQUESTER.
  1955.     When a Menu Item has Menu Sub-Item, a check will appear in the Box
  1956. next to Sub-Items. If all Sub-Items are deleted, the check will be removed.
  1957.     One last thing to remember: when a Menu Item has Sub-Items, it can
  1958. not be selectd; only one its Sub-Items are selected. This means that the
  1959. Selected Script will not be performed when the mouse is released over the Menu
  1960. Item.
  1961.  
  1962.                                      4-24
  1963.  
  1964.                                     Fields
  1965.  
  1966.     A Field is an Area in which characters can be typed using the
  1967. keyboard. CanDo provides two types of fields, Text and Integer. Text Fields
  1968. allow any character, alphabetic or numeric to be entered, Integer Fields are
  1969. resticted to positive or negative numeric (integer) values.
  1970.     Click the ADD Button in the OBJECTS PANEL to tell CanDo you want to
  1971. add an Object. Next, click the FIELD Button, telling CanDo you want to add a
  1972. Field. When the MAIN CONTROL PANEL is lowered, position the Mouse Pointer
  1973. where you wnat the upper left corner of the Field. Click the LEFT MOUSE
  1974. Button. Now when you move the Mouse Pointer, CanDo will display a rectangular
  1975. box representing the Field you are creating. Now click the Mouse Button again.
  1976. The Screen will display the FIELD DEFINITION REQUESTER (Pic.#11/Fig.#34).
  1977. Pressing the ESC key before you define the field area, returns to the MAIN
  1978. CONTROL PANEL without adding a field.
  1979.     This requester contains the Field's Name, Origin, Width, Border
  1980. Style, Justification, Type, and the available Scripts. The Name, Origin, and
  1981. Border Style work the same as in the BUTTON REQUESTER.
  1982.     The Name is a unique identifier for this Object. The Origin values
  1983. can be altered directly with the keyboard or dynamically set using the Mouse
  1984. after clicking on the Origin Button. As with Buttons, you can set the Fields'
  1985. Border by clicking on the Text Button showing the current Border Style.
  1986.     The Font used within a Field is determined by a seting within your
  1987. preferences. Most likely, you have selected 80 column text. If so, the fields
  1988. will use Topaz 8. The characters in this Font have a height and with of 8
  1989. pixels. If you have 60 column text selected, the fields will use Topaz 9. Its
  1990. characters have a height of 9 and width of 10 pixels.
  1991.  
  1992.  
  1993. Field Width
  1994.  
  1995.     The Field's Width is shown in pixels. The number of displayable
  1996. characters is this width divided by the character width of your system font.
  1997. While it is not mandatory, it is best if the Field's Width is evenly divisible
  1998. by the font's width
  1999.  
  2000. EXAMPLE:
  2001. If your Field is 64 pixels wide, divide 64 by 8, (64/8) = 8
  2002.  
  2003.                                      4-25
  2004.  
  2005.     The Field's Width can be altered using Keyboard, or resized
  2006. dynamically on your screen using the Mouse. Clicking on the WIDTH Button,
  2007. lowers the CONTROL PANEL. The Mouse controls the width of a box representing
  2008. the Field. The left side of the box is fixed at the Origin. The right side is
  2009. adjusted with the Mouse. When the rectangle is the desired width, click the
  2010. LEFT MOUSE Button. If you don't want to resize the width, press the ESC key.
  2011.  
  2012.  
  2013. Type Alignment
  2014.  
  2015.     The information in a Field can be aligned Flush Left, Centered, or
  2016. Flush Right. The Default Alignment is Flush Left. This can be altered buy
  2017. clicking on the button in the Alignment Area.
  2018.  
  2019.  
  2020. Text Field
  2021.  
  2022.     The default Field type is Text. This is indicated by the check mark
  2023. in the BOX next to "Text". Clicking on this BOX brings up the TEXT FIELD
  2024. REQUESTER (Pic.#11/Fig.#35). It allows you to define the maximum number of
  2025. characters in a Field, and the INITIAL TEXT.
  2026.     The number of visible characters is determined by the field's width.
  2027. The Maximum Number Of Characters indicates the actual number of characters the
  2028. field can contain. If it is greater than the number of visible characters, the
  2029. contents will scroll as you type or use the arrow keys.
  2030.     The INITIAL TEXT allows you to specify the characters in the field
  2031. when is it created. However, a user can still alter the Field's contents.
  2032.  
  2033.                                      4-26
  2034.  
  2035. Integer Field
  2036.  
  2037.     From the FIELD DEFINITION REQUESTER, clicking in the BOX next to
  2038. "Integer" will bring up the INTEGER FIELD REQUESTER (Pic.#11/Fig.#36). It
  2039. allows you to specify the Maximum, Minimum, and Initial values for the Field.
  2040.     The INTEGER FIELD allows a user to type any valid integer. You can
  2041. automatically insure that the value is within a range by specifying the upper
  2042. and lower boundaries in the Maximum and Mimimum values.
  2043.  
  2044. EXAMPLE:
  2045.     If you set the Maximum Value to 1000 and the Minimum Value is 50, and
  2046. the user enters a value of 10, when he presses RETURN, the value is changed to
  2047. 50, If you entered 1500, it would be changed to 1000.
  2048.     Using the Maximum and Mimimum values, Scripts can safely assume a
  2049. value is within the defined range. It also provides the user with immediate
  2050. feed back of the value being used.
  2051.     The INITIAL VALUE works similarly to the INITIAL TEXT. It provides a
  2052. default value for the Integer Field. This value can be changed by the user if
  2053. he so chooses.
  2054.  
  2055.  
  2056. Field Scripts
  2057.  
  2058.     Fields have two types of scripts, Selected and Return. The Selected
  2059. type of Script is executed when you click in the FIELD. The Return type of
  2060. Script occurs when the user presses the RETURN Key.
  2061.  
  2062.                                      4-27
  2063.  
  2064.                                    Document
  2065.  
  2066.     CanDo's Document Object allows you to choose between a Memo editor
  2067. and a List selector.
  2068.     The Memo editor is a multi-line text editor with optional scroll
  2069. bars. It provides for free form text input and display. The NO TYPING option
  2070. allows for a non-editable display.
  2071.     The List Selector displays a list of lines. The user of your
  2072. application can choose from this list by clicking with the mouse. File
  2073. Requestors use this technique to show a list of files.
  2074.     Both the Memo editor and the List selector use CanDo Documents. The
  2075. Document commands give you flexibility in the creation and manupulation of the
  2076. Document's text. These commands are described in the Scripting Commands
  2077. section.
  2078.     As with other Objects, the Name should be aunique name for an Object
  2079. for the Card. The Document field indicates the "Document name" to be used for
  2080. the Object. You should read more about "Document Name"'s in the Document
  2081. Scripting Commands. However, suffice it to say that this field indicates which
  2082. "Document Name" to associate with this Document Object. If the "Document Name"
  2083. has not already be created, CanDo will create a new one. When this is
  2084. necessary, CanDo will look for a file using the "Document Name" as the file
  2085. specification. If the file exists, it will automatically be loaded and
  2086. displayed in the Document Object. Otherwise, an empty document will be
  2087. created.
  2088.  
  2089.                                      4-28
  2090.  
  2091. Document Type
  2092.  
  2093.     The DOCUMENT EDITOR (Pic.#12/Fig.#37) allows you to choose between
  2094. Memo and List. A check mark indicates the current selection. When you click on
  2095. the BOX next to Memo, the MEMO FIELD OPTIONS REQUESTER (Pic.#12/Fig.#38) is
  2096. displayed.
  2097.     The MEMO OPTIONS REQUESTOR allows you to choose between the Scroll
  2098. Bar Options. It also allows you to select the No Typing option.
  2099.     Clicking the BOX next to No Typing enables and disables the option. A
  2100. check mark indicates that the user if your application can not type into the
  2101. Memo editor.
  2102.  
  2103.     The Memo Field Editor has four Scroll Bar Options from which to
  2104. choose. They are None, Horizonal Only, Vertical Only, and Horizonal &
  2105. Vertical. Clicking on the appropriate Image chooses the option. Clicking the
  2106. BOX next to List does not display a Requester.
  2107.  
  2108.  
  2109. Document Definition
  2110.  
  2111.     Four Buttons along the right side of the DOCUMENT EDITOR REQUESTER
  2112. allow you to define the Origin, Size, Font, and Border for the Document
  2113. Object.
  2114.  
  2115.                                      4-29
  2116.  
  2117. Document Origin
  2118.  
  2119.     Clicking the ORIGIN Button brings up the DOCUMENT ORIGIN REQUESTER
  2120. (Pic.#12/Fig.#39).
  2121.     The Horizontal and Vertical Fields allow you to specify the location
  2122. of the Document. The Horizontal Field indicates the number of pixels from the
  2123. left edge of the window. The Vertical Field indicates the number of pixels
  2124. down from the top of the window. You can reposition the document by clicking
  2125. the Button SET ORIGIN ON SCREEN. Your mouse will move a rectangular box the
  2126. size of your document. Position the box and click the mouse, or press ESC to
  2127. abort. The Horizontal and Vertical Fields will be updated to the origin
  2128. position.
  2129.  
  2130.  
  2131. Document Size
  2132.  
  2133.     Clicking the SIZE Button displays the DOCUMENT SIZE REQUESTER
  2134. (Pic.#12/Fig.#40).
  2135.     The Width and Height Fields allow you to specify the document's
  2136. dimensions. These Fields show the current values. You can modify them
  2137. directly. In addition, clicking the Button SET SIZE ON SCREEN allows you to
  2138. dynamically set them using the Mouse. The Mouse controls the corner opposite
  2139. the origin point. Adjust the size of the box and click the mouse to set the
  2140. values or press ESC to abort.
  2141.  
  2142.                                      4-30
  2143.  
  2144. Document Font
  2145.  
  2146.     Clicking the FONT Button displays the DOCUMENT FONT REQUESTER
  2147. (Pic.#6/Fig.#21).
  2148.     The DOCUMENT FONT REQUESTER allows you to choose the Font and point
  2149. size for the text to be displayed in the Document. You can also choose between
  2150. Plain and a combination of Bold, Italic, and Underlined Text. Finally, you can
  2151. choose the colors used for the text. The COLOR SELECTOR on the left is for the
  2152. Text and the one on the right is for the background.
  2153.  
  2154.  
  2155. Document Border
  2156.  
  2157.     Clicking the Border button displays the same Border Requester used
  2158. for buttons.
  2159.  
  2160.  
  2161. Document Scripts
  2162.  
  2163.     The Document Obejcts use the same Scripts as Buttons: Click, Drag,
  2164. Release, and Double. They work in the same manner. When the user first presses
  2165. the Left Mouse Button, the Click Script is performed. While thet hold the
  2166. Mouse Button down and move the pointer over the document, the Drag Script is
  2167. performed. When they Release the Mouse Button, the Release Script is
  2168. performed. And finally, if they Double Click on the document, the Double Click
  2169. Script is performed.
  2170.  
  2171.                                      4-31
  2172.  
  2173.                                     Timers
  2174.  
  2175.     CanDo has two types of timers: Interval and Alarm. Interval Timers go
  2176. off after alength of time has elapsed. Alarm Timers go off at a specified time
  2177. of day. When a Time goes off, the Occrred Script is performed.
  2178.     The TIMER EDITOR REQUESTER has two forms. Someof the titles and
  2179. buttons are changed when selecting between Interval and Alarm Timer. Interval
  2180. is the default setting. It is indicated by the check mark next to "Interval".
  2181.     An Interval Timer can go off once after the elapsed time or it can be
  2182. Reoccurring. This causes it to occur repetitively after the each interval. A
  2183. Reoccurring Interval Timer, with a short elapsed time, can cause seemingly
  2184. continuous activity while allowing other Object's Scripts to be performed if
  2185. necessary.
  2186.     When Interval is specified, the TIMER EDITOR REQUESTER
  2187. (Pic.#13/Fig.#42) allows you to specify the time interval and whether or not the
  2188. timer is re-occurring.
  2189.     The time interval is specified in Minutes, Seconds, and Jiffys.
  2190. Jiffys are fractions of a second. On NTSC Amigas, the U.S. standard, Jiffys
  2191. are 1/60th of a second. On PAL Amigas, Jiffys are 1/50th of a second. The
  2192. values can be set directly using the keyboard, or moditied using the increment
  2193. / decrement Buttons next to each field.
  2194.     Clicking the BOX next to "Reoccurring", causes the Interval Timer to
  2195. repeat continuously. For example: If the interval is set to 2 seconds,
  2196. 00:02:00, the Occurred script will be performed every 2 seconds. Clicking the
  2197. BOX next to "Reoccurring" toggles it On and Off. A check in the box indicates
  2198. that it's on.
  2199.  
  2200.                                      4-32
  2201.  
  2202.     Clicking the BOX next to "Alarm" indicates the Timer should go off at
  2203. a specified time. The ALARM TIMER can be set to occur every day or on a
  2204. specific day of the week (Pic.#13/Fig.#43).
  2205.     The Hour, Minute, and Second Fields let you indicate the Time for the
  2206. Alarm. These times can be set using the keyboard, or they can be set using the
  2207. Buttons next to each Field. The Alarm's Day Segment can be set by clicking the
  2208. Buttons AM or PM which toggle between the two.
  2209.     Alarm Timers can be set for every day or for a specific day of the
  2210. week. The default setting is Every Day. By clicking the DAY OF THE WEEK
  2211. Button, it cycles through each day of the week and Every Day.
  2212.  
  2213.                                      4-33
  2214.  
  2215.                                     Sounds
  2216.  
  2217.     The CanDo Sound Object allows you to synchronize other sounds and
  2218. graphics with a sound. The Sound Object does NOT play the sound. It simply
  2219. allow you to perform scripts when a specified sound starts or finishes
  2220. playing. While it does not play the sound, it does load it into memory, if it
  2221. is not already loaded there. When adding or editing a Sound Object, CanDo will
  2222. display the SOUND EDITOR REQUESTER (Pic.#14/Fig.#44).
  2223.     Clicking the BUTTON next to "Sound To Wait For" brings up CanDo's
  2224. FILE REQUESTER allowing you to locate the sound associated with this object.
  2225. If must be a valid 8SVX sound. 8SVX is the IFF sound standard supported by the
  2226. Amiga.
  2227.     Also on the FILE REQUESTER, you can press the HEAR IT! Button to
  2228. preview the sound. After pressing OK, the SOUND EDITOR REQUESTER will reappear
  2229. and display the name portion in the "Sound To Wait For" Button.
  2230.     The Sound Object waits for the specified sound to begin or finish
  2231. playing. Any script on the current card can play the sound using the PlaySound
  2232. or PlaySoundSequence Commands. However, they must use the exact same file
  2233. specification as the "Sound Name". If the same sound is played using a
  2234. different file specificaton or "Sound Name", the Sound Object's scripts will
  2235. not be performed.
  2236.  
  2237.  
  2238. Scripts
  2239.  
  2240.     A sound is played using the PlaySound and PlaySoundSequence Commands
  2241. (see the Sound Editor Tool and Sound Commands). Whenever the specified sounds
  2242. begins to play, the Start of Sound script is performed. When the sound is
  2243. completed, the End of Sound script is performed.
  2244.  
  2245.                                      4-34
  2246.  
  2247.                                   Animation
  2248.  
  2249.     CanDo allows you to display DPaint III style BrushAnims. The
  2250. Animation Object does NOT display the BrushAnim. It simply allows you to
  2251. perform scripts at specific points in the animation. This lets you coordinate
  2252. other activities with the animation. Selecting the Animation Button form the
  2253. Main Control Panl, brings up the BrushAnim Editor Requester (Pic.#14/Fig.#45).
  2254.     An Animation Object works with a single BrushAnim. The Animation
  2255. Object's Scripts are triggered by the specified BrushAnim's activities. If you
  2256. want Scripts associated with two BrushAnims, then you need to make two
  2257. Animation Object's. Clicking on the FILENAME Button brings up CanDo's File
  2258. Requester allowing you to locate a DPaint III style Brush Animation. Clicking
  2259. the SHOW IT! Button allows you to preview the animation.
  2260.  
  2261.  
  2262. Scripts
  2263.  
  2264.     The Scripts for the specified BrushAnim can never be performed unless
  2265. it is being displayed. The ShowBrushAnim Command can be performed in any
  2266. Script except for a Card's StartUp Script. If you want it to be shown when you
  2267. to a Card you should put it the AfterStartUp Script. See BrushAnim Scripting
  2268. Commands for more details.
  2269.     The Animation Objects allows you to perform a Script on each frame of
  2270. an animatin, on specific frames, or when a moving BrushAnim reaches a
  2271. Destination.
  2272.  
  2273.                                      4-35
  2274.  
  2275. Every Frame
  2276.  
  2277.     This Script is performed before each frame of the animation is shown.
  2278. Depending on how long you make this Script, the animation may be slowed down
  2279. drematically.
  2280.  
  2281.  
  2282. Destination
  2283.  
  2284.     This Script is performed when the animation reaches the destination
  2285. of a MoveBrushAnim or MoveBrushAnimTo Command.
  2286.  
  2287.  
  2288. BrushAnim
  2289. Frames...
  2290.  
  2291.     Individual Scripts can be performed before specific frames are shown.
  2292. THE LIST REQUESTER shows the frame numbers for which there is a Script. The
  2293. Buttons on the right hand side allow you to Add, Edit, and Delete Scripts from
  2294. the list. Clicking ADD displays the BRUSHANIM FRAME REQUESTER (Pic.#12/Fig.#46).
  2295.     It has a Slider allowing you to quickly choose the Frame Number. The
  2296. selected Frame is shown in the Frame Field. You can also enter the Frame
  2297. directly into the Field. If you click OK, the CANDO SCRIPT EDITOR will be
  2298. displayed. When you finish creating the Script, the BRUSH ANIM EDITOR will be
  2299. re-displayed.
  2300.  
  2301.                                      4-36
  2302.  
  2303.                                      Disk
  2304.  
  2305.     CanDo provides a way of performing a Script when a diskette is
  2306. removed from or inserted into the disk drive. This can be a fun way of playing
  2307. different sounds when disks are removed and inserted. While it is not usually
  2308. necessary, your application can monitor the available volumes. The Disk Object
  2309. provides a way of performing these tasks (Pic.#15/Fig.#47).
  2310.     The Disk Object has two Scripts. Disk Removed and Disk Inserted. The
  2311. scripts are performed whenever a diskette is removed or inserted from any
  2312. drive.
  2313.  
  2314.                                      4-37
  2315.  
  2316.                                    Routines
  2317.  
  2318.     Routines allow you to write a Script that can be performed by any
  2319. Object. When creating the Routine, you give it a Name. The Script is performed
  2320. using the Do Command with this name (see documentation on the Do Command for
  2321. more details).
  2322.     Unlike other Objects, the Routines Object is global to all Cards.
  2323. This means that a Routine is accessible from every Card in your Deck.
  2324.     Routines keep you from having identical Scripts in different Objects.
  2325. When you want multiple Objects to do the same thing, simply put the common
  2326. scripting commands in a Routine. You can then access the Routine from any
  2327. Object's Script using the Do Command.
  2328.     The ROUTINE EDITOR (Pic.#16/Fig.#48) has a field for the Routine's
  2329. Name. The Do Command uses this Name to access the Script. When using the Do
  2330. Command, put the Name in double "the name" qoutes.
  2331.     The Script Button allows you to write the Routine's Script. The
  2332. Script can contain Do Commands. While it is valid for a Routine to Do itself,
  2333. you should not try this unless you are familiar with the advanced programming
  2334. techniques. It is very easy to create an endless loop that uses all remaining
  2335. memory.
  2336.  
  2337.                                      4-38
  2338.  
  2339.                                     ARexx
  2340.  
  2341.     Your application can listen to one ARexx port at a time. This port is
  2342. specified using the ListenTo Command (see ARexx Commands for more
  2343. information). Other Applications can send messages to this port. Amessage is
  2344. simply an ASCII string. The first word of the message is the Command Word.
  2345. When a message is received, CanDo uses the Command Word to see if you have
  2346. ARexx Object that corresponds to it. If there is one, its Occurred Script is
  2347. performed. Clicking the AREXX Button on the MAIN CONTROL PANEL, brings up the
  2348. AREXX EDITOR REQUESTER (Pic.#16/Fig.#49).
  2349.     The Object's Name Field is initially empty. If you do not fill it in,
  2350. it will automatically be set to the word you put in Message Field when you
  2351. press the OK Button.
  2352.     The Message Field should contain a single word indentifying the
  2353. message's Command Word. When a message is received, and its Command Word
  2354. matches the word you put in this Field, the Occurred Script is performed. The
  2355. script can then use the System Variable TheMessage which contains the complete
  2356. text of the message just received.
  2357.     By making a series of ARexx objects, one for each Command Word that
  2358. can be performed by your application, you can very easily create a complete
  2359. ARexx server.
  2360.  
  2361.                                      4-39
  2362.  
  2363.                                     Xtras
  2364.  
  2365.     This Objects portion of the MAIN CONTROL PANEL contains the core
  2366. group of Objects supported by CanDo. As more Objects are added, they will be
  2367. accessible through the Xtra's Button.
  2368.     In addition to Objects, the Xtras give you access to expanded
  2369. operations. These Operations can also beaccessed through the Xtra's Button.
  2370.  
  2371.  
  2372.     Each CanDo Xtra has a file in the Xtra directory. As additional Xtras
  2373. become available, you simply put its file in the Xtras directory. Because the
  2374. Xtra Objects and operations are not individually documented in this manual,
  2375. there will be documentation files on the disk.
  2376.     Pressing the XTRA Button on the MAIN CONTROL PANEL brings up the XTRA
  2377. SELECTOR (Pic.#16/Fig.#50).
  2378.     This Selector contains a list of the available Xtras. Simply DOUBLE
  2379. CLICK an entry or click the PERFORM Button. When you do so, the selected
  2380. operation will be performed. You should make sure you are familiar with what
  2381. the Xtra is going to do by reading its documentation.
  2382.  
  2383.                                      4-40
  2384.  
  2385.                                   Chapter 5
  2386.  
  2387.                                 Script Editor
  2388.  
  2389.     Every Object has at least one Script that can be performed. By
  2390. clicking a button on the Object's Editor Requester, you can edit the Script
  2391. using CanDo's Script Editor. The Script contains Commands telling CanDo what
  2392. you want to happen when the Script is performed. CanDo's Scripting Commands
  2393. are described in Chapter 6.
  2394.     This Chapter describes how to use the Script Editor and Editor Tools.
  2395.  
  2396.  
  2397. Menus
  2398.  
  2399.     The Script Editor works like most text editors. Using the keyboard
  2400. and cursor keys you can type in your script. The vertical Slider on the right
  2401. lets you scroll through a script.
  2402.     The Editor has four Menus: Script, Text, Edit, and Misc. Some of
  2403. their Menu Items have SHORTCUT Keys. These Menu functions can be invoked using
  2404. the RIGHT AMIGA Key.
  2405.  
  2406.  
  2407. Script Menu
  2408.  
  2409.     The Script Menu contains: OK, CANCEL, VERIFY, CLEAR, and PRINT.
  2410.  
  2411. OK
  2412.  
  2413.     OK verifies the script and returns to the CanDo requester from which
  2414. you invoked the Script Editor. If the script contains an Syntax Error, a
  2415. requester will indicate nature of the error. When you select Continue, the
  2416. cursor will be placed af the beginning of the problem line.
  2417.  
  2418. CANCEL
  2419.  
  2420.     Cancel returns to the previous requester without including any
  2421. changes made to the script.
  2422.  
  2423. VERIFY
  2424.  
  2425.     Verify checks the syntax of the scirpt. Although this is done
  2426. automatically when you select OK, this option allows you to verify the script
  2427. without leaving the Scripting Editor. If an error is detected, a requester
  2428. will indicate the error and your cursor will be move to the beginning of the
  2429. line containing the error.
  2430.  
  2431. CLEAR
  2432.  
  2433.     Clear erases all lines in the Script Editor. Should you inadvertently
  2434. clear a script, select Cancel and re-invoke the Script Editor.
  2435.  
  2436. PRINT
  2437.  
  2438.     Print sends the entire contents of the Script Editor to the Printer.
  2439.  
  2440.                                      5-1
  2441.  
  2442. Text Menu
  2443.  
  2444.     The Text Menu allows you to Load, Save, and Insert text.
  2445.  
  2446. LOAD
  2447.  
  2448.     Load replaces the contents of the Script Editor with the contents of
  2449. a Fil. Cando's File Requester allows you to locate the file.
  2450.  
  2451. SAVE
  2452.  
  2453.     Save writes the contents of the Script Editor to with CanDo's File
  2454. Requester, and inserts it into the Script at the currently exists, it will be
  2455. replaced.
  2456.  
  2457. INSERT
  2458.  
  2459.     Insert takes the contents of a file, specified with CanDo's File
  2460. Requester, and inserts it into the Script at the current cursor position.
  2461. Unlike Load, it does not first clear the existing script.
  2462.  
  2463.  
  2464. Edit Menu
  2465.  
  2466.     The Edit Menu allows you to Search For and Replace text in the
  2467. Script.
  2468.  
  2469. SEARCH
  2470.  
  2471.     Search... searches for the next occurrence of a text string. A
  2472. requester allows you to specify the string to search for.
  2473.  
  2474. SEARCH NEXT
  2475.  
  2476.     Search Next searches for next occurrence of the last text string
  2477. specified with Search...
  2478.  
  2479. REPLACE
  2480.  
  2481.     Replace... searches for the next occrrence of a text string and
  2482. repleaces it with another. A requester allows you to specify the Search string
  2483. and the Replace String.
  2484.  
  2485. REPLACE NEXT
  2486.  
  2487.     Replace Next repeats the last Replace... operation without bringing
  2488. ip the Search/Replce Requester.
  2489.  
  2490. REPLACE ALL
  2491.  
  2492.     Replace All replaces all occurrences of a text string with another.
  2493.  
  2494.  
  2495. Misc. Menu
  2496.  
  2497.     The Mics. Menu contains: Help, Delete Line, Delete to EOL, and
  2498. Undelete Line.
  2499.  
  2500. HELP
  2501.  
  2502.     Help brings up the Scripting Help Requester. This Requester is
  2503. described later in this Chapter.
  2504. DELETE LINE.
  2505.  
  2506.     Delete Line erases the current line. It can be restored using
  2507. Undelete Line.
  2508.  
  2509. DELETE TO EOL
  2510.  
  2511.     Delete to EOL erases all characters from the current cursor position
  2512. to the end of the line. The characters can be restored using Undelete Line.
  2513.  
  2514. UNDELETE LINE
  2515.  
  2516.     Undelete Line restores the characters erased by the last Delete Line
  2517. and Delete To EOL.
  2518.  
  2519.                                      5-2
  2520.  
  2521. Shortcut Buttons
  2522.  
  2523.     Six of the Menu Items have a shortcut button located at the top of
  2524. the Scripting Editor: OK, Cancel, Search..., ...Next, Replace..., and Help.
  2525. These buttons work the same way as their menu counterparts.
  2526.  
  2527. Scripting Help
  2528.  
  2529.     You can get help on CanDo's Scripting Commands, Functions and System
  2530. Variables through the SCRIPTING HELP REQUESTER (Pic.#15/Fig.#52). If is invoked
  2531. by selecting the Help Menu Item under Misc., by clicking the HELP button, or
  2532. double clicking a word in your script. CanDo will try to give you help for the
  2533. word under the cursor or for the first word on the line.
  2534.     The main area of the requester displays the help message. When there
  2535. is more information than can be displayed in the message area, you can use the
  2536. NEXT PAGE Button to move forward. The PREV PAGE Button can then allow you to
  2537. move backwards.
  2538.     Some of the words in the message area can be clicked on for
  2539. additional help. You can identify these words because they will be in Red. By
  2540. clicking on a RED WORD, a related help topic will be shown i place of the one
  2541. which you are currently reviewing. When you want to return to the previous
  2542. help topic, press the BACK Button. If you have moved several levels from your
  2543. original Help Message, you can return to the first one by pressing the TOP
  2544. Button.
  2545.     The Topics, Commands, Functions, and Variables Buttons allow you to
  2546. look up other Help Messages. By pressing one of these Buttons, the list on the
  2547. right will contain a selection to choose from.
  2548.     Pressing the TOPICS Button displays a list of Topics such as Graphics
  2549. and Card Movement. When you select one of the listed Topics, the lister will
  2550. the display all of the Commands for the Topic and the COMMANDS Button will be
  2551. highlighted. Clicking on one of the Entries in the list, displays its Help
  2552. Message.
  2553.     By clicking the FUNCTIONS Button, the list will display the Functions
  2554. for the Topic. Clicking the VARIABLES Button shows the System Variables.
  2555.     When you are ready to return to the Script Editor, press the Exit
  2556. Button.
  2557.  
  2558.                                      5-3
  2559.  
  2560.                                  Editor Tools
  2561.  
  2562.     Along the right side of the Script Editor is a selection of Editor
  2563. Tools. These Tools allow you to interactively create scripts.
  2564.     For beginners, this is an easy way to get started without spending
  2565. too much time learning Scripting Commands. In fact, using the Editor Tools can
  2566. be the easiest way to learn. By using them to create your own "examples", you
  2567. can learn both specific Commands and the way CanDo's Scripting Commands work
  2568. in general.
  2569.     Advanced Users can create a "rough" script performing some of the
  2570. tasks they want to accomplish. By changing a few constants to variables, and
  2571. adding a loop, or other such modifications, it can be very easy to create
  2572. sophisticated scripts.
  2573.     Some Tools make it easy to access things that CanDo "knows" about.
  2574. Card, Routine, and File Names, to name a few, are more easily and accurately
  2575. identified using Editor Tools. Other Tools simply let you see the results
  2576. before you try it out.
  2577.     When you click on one of the Icons, a specialized requester will help
  2578. you in creating your script. Feel free to just play around with the Tools.
  2579. However, you should be familiar with CanDo's ARexx capabilities befoe
  2580. exploring the ARexx Editor Tool.
  2581.  
  2582.                                      5-4
  2583.  
  2584.                               Paint Editor Tool
  2585.  
  2586.     The Paint Editor Tool works like a small paint program. By using its
  2587. Tools, you can draw in the window and it will create the necessary Scripting
  2588. Commands. By selecting the PAINT EDITOR TOOL ICON (Pic.#18/Fig.#53), CanDo will
  2589. display the EDITOR TOOL PANEL. At the very bottom a color bar will display the
  2590. current color palette. The Paint Editor Tool is designed to look and feel like
  2591. a simple painting package. You simply select a drawing Tool, a color to use,
  2592. and draw in your window.
  2593.     While it may seem like a paint program, you need to be aware that you
  2594. are creating a Script. Each action you take generates Scripting Commands. It
  2595. is very easy to create large Scripts using this Tool.
  2596.  
  2597.                                      5-5
  2598.  
  2599. Dots and Continuous dots and Drawing Lines
  2600.  
  2601.     These Tools allow you to draw in a series of dots or small connected
  2602. lines. Simply select a color and draw using the LEFT MOUSE Button. You should
  2603. keep in mind that these Tools can easily create large Scripts.
  2604.     The Line Tool allows you to draw a line in the window. Simply
  2605. position the mouse pointer, press and hold the LEFT MOUSE Button, move the
  2606. mouse pointer and release the Mouse Button. A line will be draw between the
  2607. two points.
  2608.  
  2609. Flood Fill
  2610.  
  2611.     The Flood Fill Tool allows you to fill an enclosed area with the
  2612. selected color. Position the mouse pointer on your window and click the LEFT
  2613. MOUSE Button.
  2614.  
  2615. Triangle and Area Triangle
  2616.  
  2617.     These Tools allow you to draw triangles. The Triangle Tool draws with
  2618. lines, and the Area Triangle Tool draws filled Triangles. Simply define one
  2619. side of the triangle in the same manner as drawing a line. When you release
  2620. the mouse button, the pointer will control the position of the third vertex.
  2621. Position the pointer and click the LEFT MOUSE Button.
  2622.  
  2623. Parallelogram and Area Parallelogram
  2624.  
  2625.     These Tools allow you to draw parallelograms, a four sided polygon
  2626. with parallel lines. The Parallelogram Tool draws with lines, and the Area
  2627. Parallelogram Tool draws with a solid color. Draw a line by positioning the
  2628. mouse pointer at the first vertex, press and hold the LEFT MOUSE Button, and
  2629. drag the mouse pointer to the second vertex and release the Mouse Button. The
  2630. Mouse pointer will now control the three remaining sides. As you move the
  2631. pointer, a parallelogram will be formed. When you press the Mouse Button
  2632. again, the final image will be displayed.
  2633.  
  2634. Rectangle and Area Rectangle
  2635.  
  2636.     These Tools allow you to draw a rectangle with lines or a filled
  2637. block. Position the Mouse pointer, press and hold the LEFT MOUSE Button to
  2638. define on of the corners. While holding down the Mouse Button, drag the
  2639. pointer to the opposite corner and release the Mouse Button.
  2640.  
  2641. Circle and Area Circle
  2642.  
  2643.     Using these Tools, you can draw filled or unfilled circles. These
  2644. Tools do not automatically adjust the radius for all screen dimensions.
  2645. However, you can use the ellipse Tool for these situations.
  2646.     Position the Mouse Pointer then press and hold the LEFT MOUSE Button.
  2647. This defines the cente of the ellipse. While holding the mouse button, drag
  2648. the pointer to define the size of the circle and release the Mouse Button.
  2649.  
  2650. Ellipse and Area Ellipse
  2651.  
  2652.     These Tools allow you to draw filled or unfilled ellipses using the
  2653. currently selected color. Position the Mouse Pointer and press the LEFT MOUSE
  2654. Button. This defines the center of the ellipse. While holding the Mouse
  2655. Button down, drag the pointer to define the size and shape of the ellipse and
  2656. release the Mouse Button.
  2657.  
  2658. Brush Clip
  2659.  
  2660.     This Tool copies a rectangular area of the current window so it can
  2661. be used be the Draw With Brush Tool. Simply positon the Mouse Pointer to one
  2662. of the corners and press the LEFT MOUSE Button. While holding down the left
  2663. mouse button, drag the pointer to the opposite corner and release the mouse
  2664. button. The Draw With Brush Tool will automatically be selected.
  2665.  
  2666.                                      5-6
  2667.  
  2668. Draw with Brush
  2669.  
  2670.     This Tool draws with a clipped brush created using the Brush Clip
  2671. Tool. CanDo will not allow you to select this Tool if you have not previously
  2672. clipped a brush. When this Tool is selected, you will see the clipped image as
  2673. you move the mouse pointer. Simply position the image and click the LEFT MOUSE
  2674. Button.
  2675.  
  2676. Draw-Mode
  2677.  
  2678.     The Draw-Mode Button toggles between Normal and Complement
  2679. (Pic.#17/Fig.#54).
  2680.     While in Normal Mode, the drawing Tools will draw using the currently
  2681. selected color. While in Complement Mode, the drawing Tolls will completement
  2682. the colors over which they are drawing. The advantage of Complement Mode is
  2683. that when the script is repeated, the drawing will Complement back to what is
  2684. was.
  2685.  
  2686. Multi-Mode
  2687.  
  2688.     The Multi-Mode Button toggles on and off. When it is off, drawing
  2689. Tools will draw a singe image. When it is on, the Line, Triangle,
  2690. Parallelogram, Rectangle, Circle, and Ellipse Tools will draw multiple images.
  2691.  
  2692. Clear
  2693.  
  2694.     The Clear Button clears the window. Remember, this plaecs a
  2695. ClearWindow Command in the Script, and is not the same thing as starting over.
  2696.  
  2697. Undo
  2698.  
  2699.     The Undo Button will undo previous operatons. Each time you press the
  2700. Undo Button, the last operaton will be forgotten, and all remaining operations
  2701. will be re-displayed, This can be repeated until all operations have been
  2702. forgotten. This provides the unique feature of unlimited undo's. However, you
  2703. need to keep in mind that you are removing Scripting Commands.
  2704.  
  2705.                                      5-7
  2706.  
  2707. Selecting a Color
  2708.  
  2709.     The COLOR SELECTOR (Pic.#17/Fig.#55) displays the current drawing
  2710. color. You can use the up and down arrows to step through the available color,
  2711. or simply click on the color in the COLOR BAR. The PALETTE SLIDERS allow you
  2712. to change a color.
  2713.     Remember, changing a color generates a Scripting Command. It does not
  2714. change the initial Palette. Rather, it changes the color when this Script is
  2715. performed. NOTE: You should avoid changing the colors in a Workbench window.
  2716.  
  2717.  
  2718.                                Text Editor Tool
  2719.  
  2720.     The Text Editor Tool helps you print text in your window. When you
  2721. select the TEXT EDITOR TOOL ICON, the TEXT EDITOR TOOL REQUESTER will be
  2722. displayed.
  2723.     Selecting the SET TEXT AND FONT... Button brings up the TEXT AND FONT
  2724. REQUESTER (Pic.#16/Fig.#56).
  2725.     This requester works in an identical fashion to the TEXT BUTTON
  2726. DEFINITON REQUESTER described on Page 4-10.
  2727.     After setting the Text and Font, click the SET POSITION... Button.
  2728. This will allow you to position a representation of the text using the mouse.
  2729. Click the LEFT MOUSE Button when it is positioned where you want it to be.
  2730.  
  2731.                                      5-8
  2732.  
  2733.                               Sound Editor Tool
  2734.  
  2735.     The Sound Editor Tool helps you play sounds. CanDo supports the
  2736. playing of 8SVX digitized sound files, the standard supported by the Amiga.
  2737. This Tool helps you select a sound, volume and audio channel.
  2738.     Selecting the SOUND EDITOR TOOL ICON brings up the SOUND EDITOR TOOL
  2739. REQUESTER (Pic.#16/Fig.#57).
  2740.     This Requester allows you to choose from three options: selecting a
  2741. sound file, changing the volume, and selecting an audio channel. You can
  2742. choose one or more of these options. CanDo will produce the Scripting Commands
  2743. for the options you choose. For example, you can select a sound File and a
  2744. channel and not choose a volume.
  2745.     Clicking the SET THE FILENAME... Button brings up CanDo's FILE
  2746. REQUESTER. You can use it to locate the sound you want to play. When you
  2747. select OK, CanDo verifies the File is an 8SVX digitized sound, and returns you
  2748. to the SOUND EDITOR TOOL REQUESTER.
  2749.     Selecting the SET THE VOLUME... Button brings up the SET VOLUME
  2750. REQUESTER (Pic.#15/Fig.#58).
  2751.     This Requester has slider and a field you can use for selecting the
  2752. volume level. The slider is scaled from 0% to 100%. As you move the slider,
  2753. the value in the Volume Field will show the equivalent volume setting. This
  2754. value ranges from 0 to 64. You can also set this value using the keyboard.
  2755. When you select OK, the SOUND EDITOR TOOL REQUESTER is re-displayed.
  2756.     NOTE: When you change the volume setting, all subsequent sounds will
  2757. be played at the selected volume.
  2758.  
  2759.                                      5-9
  2760.  
  2761.     Selecting the SET THE CHANNEL... Button from the SOUND EDITOR TOOL
  2762. REQUESTER brings up the SET CHANNEL REQUESTE (Pic.#17/Fig.#59).
  2763.     This Requester allows you to specify a specific audio channel on
  2764. which to play a sound. If you do not select a channel, the sound will play on
  2765. the next available sound channel. By chosing a specific audio channel, you can
  2766. control which speaker the sound is played on. Audio channels 0 and 3 are
  2767. played on the left side, and channel 1 and 2 is played on the right side.
  2768.  
  2769. However, if the specified audio channel is being used when the Script is
  2770. performed, the sound will nut be played.
  2771.     When you select one of the four Buttons, it will become highlighted.
  2772. When you select OK from the SET CHANNEL REQUESTER, you will return to the
  2773. SOUND EDITOR TOOL REQUESTER.
  2774.     Remember, whatever you are using the SOUND EDITOR TOOL REQUESTER, you
  2775. can select OK and CanDo will return you to the SCRIPT EDITOR. CanDo will
  2776. produce the Scripting Commands for the options you have selected up to that
  2777. point.
  2778.  
  2779.  
  2780.                              Picture Editor Tool
  2781.  
  2782.     The Picture Editor Tool helps you locate a Picture and creates the
  2783. Command to show it. When you select the PICTURE EDITOR TOOL ICON, CanDo's FILE
  2784. REQUESTER will allow you to find the picture file. When you select OK, CanDo
  2785. will create the Command to show the picture.
  2786.  
  2787.                                      5-10
  2788.  
  2789.                                DOS Editor Tool
  2790.  
  2791.     The DOS Editor Tool helps you Run another program. When you select
  2792. the DOS Editor Tool Icon, CanDo's File Requester will appear. Locate the
  2793. program you want to run, and press OK. CanDo will verify it is an executeable
  2794. program.
  2795.     This Tool creates a DOS Command. It simply tells the Amiga Operating
  2796. System to execute the program within the quotes. The Editor Tool puts the word
  2797. "c:Run" in front of the program you selected.
  2798.  
  2799. FOR EXAMPLE:
  2800.  
  2801.     DOS "C:RUN C:DIR"
  2802.  
  2803.     This allows your CanDo application to continue running after is
  2804. starts the selected program. If you want your CanDo application to wait until
  2805. the selected program is done, you can remove the word "C:RUN" from the
  2806. command.
  2807.  
  2808.     DOS "C:DIR"
  2809.  
  2810.     Some programs allow parameters to be passed on the command line. You
  2811. can do this by adding them after the selected program.
  2812.  
  2813.     DOS "C:DIR >RAM:WORKFILE"
  2814.  
  2815.     This final example would execute the Dir command in the C: directory.
  2816. It does not have a "RUN". Therefore, your CanDo application will wait until
  2817. the command has completed before continuing. Finally, it tells the Dir command
  2818. to save its output in a file called "RAM:WORKFILE".
  2819.  
  2820.  
  2821.                                File Editor Tool
  2822.  
  2823.     The File Editor Tool helps you to locate a file using CanDo's File
  2824. Requester. It does not create a complete Scripting Command. It simply returns
  2825. the file specification enclosed in double qoutes. Many of CanDo's Commands use
  2826. a file specification in this form. This way, you can use the File Editor Tool
  2827. to locate the file for one of these Commands.
  2828.  
  2829.  
  2830.                              Coords. Editor Tool
  2831.  
  2832.     The Coordinates Editor Tool allows you to find the x,y coordinates of
  2833. a location on your Window. When you select the Coordinates Editor Tool Icon,
  2834. you should move the cross-hairs to the location you want and press the Left
  2835. Mouse Button.
  2836.     This Editor Tool does not create a complete Scripting Command. It
  2837. simply returns the horizontal and vertical values for a single location. Many
  2838. of CanDo's Scripting Commands use these x,y values. You can use this Editor
  2839. Tool for finding x,y coordinates for one of these Commands.
  2840.  
  2841.                                      5-11
  2842.  
  2843.                                Card Finder Tool
  2844.  
  2845.     The Card FINDER EDITOR TOOL helps you with Card Movement Commands.
  2846. Selecting its Icon displays the CARD FINDER REQUESTER (Pic.#19/Fig.#60).
  2847.     This Requester has Buttons on the left side for each of the options,
  2848. and a list of all Card Names on the right side. This list works in conjunction
  2849. with the first two options, inserting the Card Name and inserting a "Goto". By
  2850. clicking on one of the entries, the Name is placed in the Card Name Field.
  2851.     After selecting a Card Name, pressing the INSERT THE NAME OF THIS
  2852. CARD Button returns you to the Editor. The selected Name will be typed into
  2853. your Script.
  2854.     Selecting one of the four Buttons at the bottom, FIRST, PREVIOUS,
  2855. NEXT, and LAST, inserts a single Scripting Command. These Commands do not use
  2856. the selected Card Name.
  2857.  
  2858.  
  2859.                              Routine Editor Tool
  2860.  
  2861.     The Routine Editor Tool displays a list all the Routine names and
  2862. allows you to insert the Name or a "Do" Command for the Routine. When you
  2863. select the ROUTINE EDITOR TOOL ICON, CanDo will display the ROUTINE FINDER
  2864. REQUESTER (Pic.#17/Fig.#61).
  2865.     The ROUTINE FINDER REQUESTER displays a list of all currently defined
  2866. Routines in a list on the right side of the Requester. By clicking on one of
  2867. the entries, its Name will be placed in the Routine Name Field.
  2868.     When you select the INSERT THE NAME OF THIS ROUTINE Button, CanDo
  2869. will put the Routine Name, enclosed in quotes, into your Script.
  2870.     When you select the INSERT A "DO" TO THIS ROUTINE Button, CanDo will
  2871. put a Do Command into your Script.
  2872.  
  2873.                                      5-12
  2874.  
  2875.                               Field Editor Tool
  2876.  
  2877.     The Field Editor Tool helps you with the Field Object. The Field
  2878. Object allows the user of your application to enter or otherwise edit a single
  2879. line of text or an integer number. You can set or retrieve the contents of a
  2880. Field using Scripting Commands. This Editor Tool assists you in doing this.
  2881.     Selecting the Field Editor Tool Icon displays the FIELD EDITOR TOOL
  2882. REQUESTER (Pic.#19/Fig.#62).
  2883.     This Requester displays the Object Name for all Fields on the current
  2884. card and gives you three Scripting options. You can simply insert the Object's
  2885. Name, set the contents of the Field, or retrieve the contents of the Field.
  2886.  
  2887. Selecting a Name
  2888.  
  2889.     Each Field is given a Name on the FIELD EDITOR REQUESTER. The Names
  2890. for all Field Objects are displayed in the list on the right side of the FIELD
  2891. EDITOR TOOL REQUESTER (Pic.#19/Fig.#62). By clicking an entry, the Name will
  2892. be put into the FIELD NAME Field. You should select an entry by clicking one
  2893. of the three Scripting options.
  2894.  
  2895. Insert Field's Name
  2896.  
  2897.     Clicking the INSERT THE NAME OF THIS FIELD Button automatically types
  2898. the selected Object Name with double qoutes on each side. This is a simple way
  2899. of finding a Field Name and using it with a Scripting Command. This option
  2900. does not produce a complete Scripting Command.
  2901.  
  2902.                                      5-13
  2903.  
  2904. Set Field's Contents
  2905.  
  2906.     Clicking the SET THIS FIELD'S CONTENTS TO... Button displays the SET
  2907. FIELD REQUESTER (Pic.#17/Fig.#63).
  2908.     The New Value Field allows you to type in a value to be put in the
  2909. selected Field. If the selected Field is an Integer Field, you will be limited
  2910. to entering a valid integer value. Otherwise, you can enter any characters you
  2911. wish. Remember, if you want to include any double qoutes, you should put two
  2912. in a row (""). Selecting OK creates the necessary Scripting Command and
  2913. returns you to the Editor.
  2914.  
  2915. Put in a Fields Contents
  2916.  
  2917.     Selecting the PUT THIS FIELD'S CONTENTS INTO... Button displays the
  2918. GET FIELD REQUESTER (Pic.#19/Fig.#64).
  2919.     This Requester aids you in retrieving the contents of a Field and
  2920. putting the value into a variable. You need to provide the Variable Name on
  2921. the provided Field. Clicking OK creates the necessary Scripting Command and
  2922. returns you to the Field Editor Tool.
  2923.  
  2924.                                      5-14
  2925.  
  2926.                               ARexx Editor Tool
  2927.  
  2928.     The ARex Editor Tool helps you send and receive ARexx messages. If
  2929. you are interested in doing this, it si recommended that you read both the
  2930. ARexx Object and ARexx Commands sections before doing so. While this Editor
  2931. Tool makes it easier to produce the ARexx Commands, you should first
  2932. familiarize yourself with the ARexx concepts.
  2933.     Before sending ARexx messages to an application, acquaint yourself
  2934. with its ARexx capabilities. It should have documentation for its ARexx Port
  2935. Name and the Commands it can receive.
  2936.     After selecting the AREXX EDITOR TOOL ICON, CanDo will display the
  2937. AREXX EDITOR TOOL REQUESTER (Pic.#20/Fig.#65).
  2938.     From this Requester you can select a Message Port to listen to or
  2939. speak to, or send an ARexx Message to the current SpeakToPort.
  2940.  
  2941. ListenTo
  2942.  
  2943.     Selecting the SELECT A MESSAGE PORT TO LISTEN TO... Button, displays
  2944. the LISTENTO REQUESTER (Pic.#20/Fig.#66).
  2945.     This Requester allows you to specify the ARexx Port Name that your
  2946. application uses to receive ARexx messages. It is recommended that you put
  2947. this in the StartUp Script of your first Card. Selecting the INSERT THE
  2948. "LISTENTO" Button inserts the Command and returns you to the Editor.
  2949.  
  2950.                                      5-15
  2951.  
  2952. SpeakTo
  2953.  
  2954.     Selecting the SELECT A MESSAGE PORT TO SPEAK TO... Button from the
  2955. AREXX EDITOR TOOL REQUESTER displays the SPEAKTO SELECTOR (Pic.#20/Fig.#67).
  2956.     The SPEAKTO SELECTOR displays all of the Public Message Ports. While
  2957. an ARexx Port is Public, not all Public Ports can receive ARexx messages. In
  2958. fact, sending a message to some ports will cause the Amiga to crash. You
  2959. should know the Name of the Port to which you wish to send a message. This
  2960. Selector simply makes it easier for you to find the Name and insure that it is
  2961. currently available.
  2962.     Clicking an entry selects the Name and puts it into the Port Field.
  2963. Selecting the INSERT THE "SPEAKTO" Button or double clicking an entry inserts
  2964. the Command and returns to the Editor.
  2965.  
  2966. Send Message
  2967.  
  2968.     Selecting the SEND AN AREXX MESSAGE Button from the AREXX EDITOR TOOL
  2969. REQUESTER displays the SEND AREXX MESSAGE REQUESTER (Pic.#21/Fig.#68).
  2970.     This requester allows you to send a message to the current
  2971. SpeakToPort. Simply enter the message and click the INSERT THE "MESSAGE"
  2972. Button. This will insert the SendMessage Command and return you to the Editor.
  2973.  
  2974.                                      5-16
  2975.  
  2976.                                   Chapter 6
  2977.  
  2978.                                    Commands
  2979.  
  2980.     CanDo has over 200 scripting Commands and Functions. However, you
  2981. shouldn't feel as though you need to know how to use all of them in order to
  2982. make your application. In fact, you really only need to know a few to get
  2983. started.
  2984.     You should use the Editor Tools to get your feet wet. By looking at
  2985. the Commands they produce, you can learn a great deal about the way the
  2986. Commands work.
  2987.     At first you will want to use this Chapter as a reference for the
  2988. Commands your encounter. As your needs grow, you will want to read about a
  2989. certain cleasses of Commands. This Chapter is organized for this purpose. Each
  2990. section describes certain aspects or classes of Commands.
  2991.     While you do not initially have to understand Expressions and
  2992. Functions, you should eventually read the first two sections of this Chapte.
  2993. By making use of Expressions and Functions, you can easily add a lot of
  2994. sophistication to a simple application.
  2995.     The FlowControl and CardMovement Commands are very powerful. They
  2996. allow you to change what is happening in your application. The CardMovement
  2997. Commands, in particualr, are very simple and you should learn to use them
  2998. early on.
  2999.     The Graphic, Screen and Window, Animation, and Audio Commands are the
  3000. spice you use in your CanDo applications. However, these comprise the majority
  3001. of the Commands and they amy take little while to master. Keep in mind that
  3002. you don't have to learn to use everything. If something seems complicated,
  3003. come back to it later.
  3004.     The Document Commands are unique. You can use them with the Document
  3005. Objects or for internal manipulation of text. These Commands bring an
  3006. additional level of power to the manipulation text. Depending on your needs,
  3007. you may not want to work with these initially.
  3008.     File I/O, Icons, ARexx, Object and Buffer Commands should be
  3009. considered advanced. Power users can use these Commands to make applicatons
  3010. that rival professional software.
  3011.     Finally, Mics. Commands rounds off a few Commands that you may find
  3012. useful in your application.
  3013.  
  3014.                                      6-1
  3015.  
  3016. Command Symbols
  3017.  
  3018.     There are several symbols used in describing the various Commands and
  3019. Functions.
  3020.  
  3021.     < > are used to indicate Integers. *
  3022.     " " are used for Stings. *
  3023.     « » are used for Logicals. *
  3024.     { } are used to show optional parameters are Optional.
  3025.     ,   a Comma separates parameters.
  3026.     ;   end of a Command line.
  3027.  
  3028.     KEYWORDS are always shown in all capital letters.
  3029.  
  3030.     * You should read the Expression System sectoin for an explanation of
  3031.       Integers, Strings and Logicals.
  3032.  
  3033.                                      6-2
  3034.  
  3035.                                  Expressions
  3036.  
  3037.     An expression is a group of constants, variables, and functions
  3038. combined with operators. You use expressions to tell CanDo's scripting
  3039. commands what to do.
  3040.     Most of the time, you will use constans such as 5,"Hello", and ON.
  3041. However, sometimes you will want to do more sophisticated operations.
  3042. Expressions allow you to describe a value that is determined at the time the
  3043. command is performed.
  3044.     Cando's expression system has been designed to be as intuitive as
  3045. possible. Numbers are represented as integer constants. Strings are contained
  3046. in double "quotes". And logical values use names such as ON, OFF, YES, NO,
  3047. TRUE, and FALSE. In addition, you can mix integer, string, and logical values
  3048. within expressions, and CanDo will automatically convert the values as needed.
  3049.     This section describes the details of CanDo's expression system.
  3050. While it is not necessary for you to understand all aspects of this system,
  3051. CanDo provides many sophisticated operations and functions. Depending upon
  3052. your experience level, you may want to use this as a reference section or you
  3053. may want to read it for a complete understanding of CanDo's expression system.
  3054. Either way, you should at least scan it to get a grasp of its principles and
  3055. abilities.
  3056.     Most of CanDo's scripting commands use expressions to provide the
  3057. information for the operaton. For example, the LET command saves a value in a
  3058. variable. The format for LET command is:
  3059.  
  3060. LET VariableName = expression.
  3061.  
  3062. The results from evalution the expression is saved in the indicated variable.
  3063.  
  3064. Example:
  3065.     LET X = 100
  3066.  
  3067.     In this example, 100 is a simple expression containing a single
  3068. integer constant. It is saved in the variable 'X'.
  3069.  
  3070.     LET Y = X * -2
  3071.  
  3072.     The expression in this example is 'X * -2'. The result, -200, is
  3073. assigned to the variable 'Y'.
  3074.  
  3075.     LET Z = 5 + ABSOLUTE ( Y + 10 )
  3076.  
  3077.     This expression uses the ABSOLUTE function. A function takes one or
  3078. more parameters within parenthsis, performs an operation, and returns a single
  3079. value. Each parameter within a function can be an expression. The parameter
  3080. for the ABSOLUTE function, in this example, is the expresson 'Y + 10'. As you
  3081. might expect, the ABSOLUTE function returns the absolute value of an
  3082. expression. The absolute value of the expression '-200 + 10' is 190. 'Z' is
  3083. assigned the value of '5 + 190', or 195.
  3084.  
  3085.                                      6-3
  3086.  
  3087.     An Expression is a combination of constants, variables, and functions
  3088. with operators for computation. The evaluation of an expression results in a
  3089. singel value.
  3090.     Within CanDo, expressions use three types of values: Integer, Strings
  3091. and Logicals.
  3092.  
  3093.  
  3094. Integers
  3095.  
  3096.     Integers are the basic numeric system for dealing with graphics and
  3097. computer control. Integers are whole numbers that range from -214.783.648 to
  3098. 214.783.648.
  3099.     An integer constant is a series of digits. A minus sign preceding the
  3100. digits indicates a negative integer. A plus sign is not necessary to indicate
  3101. a positive integer. However, it can be used to provide clarity.
  3102.  
  3103. Examples:
  3104.     105    -5000    +6
  3105.  
  3106.  
  3107. Strings
  3108.  
  3109.     Strings are groups of characters. String constants are characters
  3110. contained within double quotes. For example: "Fred is Here". However, the
  3111. double quotes are not part of the string. They simply show where the string
  3112. begins and ends.
  3113.     Strings can be as large as available memory will allow. Or a string
  3114. can be empty. An empty string is often referred to as a null string. CanDo
  3115. recognizes a null string as two double quote marks "".
  3116.     Strings can contain any character. These include many that are not
  3117. visible or are considered part of the International characte set.
  3118.     For a string to contain a double quote, it must be typed twice within
  3119. the string. CanDo will teat is as though only one is contained in the string.
  3120. For example "Fred says""Hi"" th everyone." contains the word "Hi" within the
  3121. string.
  3122.  
  3123.  
  3124. Logicals
  3125.  
  3126.     Logicals (known as Booleans) simply mean true of false. The words
  3127. TRUE and FALSE are logical constants. Within CanDo, YES and ON also mean TRUE.
  3128. Similarly, NO and OFF mean FALSE.
  3129.  
  3130.  
  3131. Variables
  3132.  
  3133.     A variable is a name to be used in the place of an integer, string,
  3134. or logical constant value. Variables can be thought of as storage locations
  3135. for values. CanDo does not require you to 'declare' a variable.
  3136.     Variable names may contain letters, digits, and underscore character
  3137. (_). The name must begin with a letter. The names can be any length. However,
  3138. longer names use more memory and take longer to identify.
  3139.     Any variable name can be used for integers, strings, or logicals.
  3140.  
  3141.                                      6-4
  3142.  
  3143. LET
  3144.  
  3145. LET VariableName = expression
  3146.  
  3147.     The LET command allows you to save a value in a variable. CanDo
  3148. evaluates the expression and then saves the value in the variable. This value
  3149. will be used in the evaluation of expressions containing the variable.
  3150.     CanDo also provides system variables and functions such as 'MouseX'
  3151. and 'Sign (expr)'. With the exception of these variables and functions, any
  3152. variable name can be used.
  3153.  
  3154.  
  3155. Expressions
  3156.  
  3157.     An expression contains constants, variables, and functions that can
  3158. be combined with operators to form a new value.
  3159.     An example of a simple expression is 'Count + 5'. The first value,
  3160. 'Count', is a variable. The second value, '5' is an integer constant. The '+'
  3161. represents the addition operator. This expression adds the constants of the
  3162. variable 'Count' with 5.
  3163.     Constants, variables, and functions can be used interchangebly as
  3164. values within an expression.
  3165.     An operator is a symbol that represents a process to be performed on
  3166. one or two values.
  3167.     CanDo allow any type of value to be used with any operator. Strings,
  3168. integers, and logicals can be used interchangeably with any operation. Each is
  3169. automatically converted to the type of data used by the operator.
  3170.  
  3171. Examples:
  3172.  
  3173. "-1000" + 5
  3174.  
  3175.     The additon operator (+) adds two integer values. The first value,
  3176. "-1000" is a string. It is automatically converted to an integer value of
  3177. -1000 and is added to 5. The result of this expression is -995.
  3178.  
  3179.  
  3180. "-1000" || 5
  3181.     The string concatenation operator (||) appends two strings together.
  3182. The first value in the expression is a string "-1000". However, the second
  3183. value is an integer constant 5. It is converted to a string constant of "5"
  3184. and appended to "-1000" the result of this expression is "-10005".
  3185.  
  3186.     The default value for an unassigned variable is either an integer
  3187. ZERO (0), a string NULL ("") or a logical FALSE. The default value used is
  3188. determined by the type of operation being performed. For example, RepeatCount
  3189. will have default value of ZERO for the expression (5 + RepeatCount).
  3190.     The automatic conversion makes it easier to work with different kinds
  3191. of data. It isn't necessary to keep track of different variable types or to
  3192. use conversion functions. Most of the time, different data types can be used
  3193. interchangeably without special consideration. The automatic conversion is
  3194. described in the following sections so that predictable results can easily be
  3195. achieved.
  3196.  
  3197.                                      6-5
  3198.  
  3199. Order of Evalution
  3200.  
  3201.     Each operator has a "priority" that defermines the order of
  3202. computation. For example, multiplication is performed before additon. The
  3203. priority scale ranges from 1 to 8, where oparations with a priority of 8 are
  3204. performed first and operations with a priority of 1 are last.
  3205.     The proirities cause expressions to be evaluated in the standard
  3206. order of algabraic rules. Operators with the parenthesis are evaluated first,
  3207. following by the next lower priority. Operators with the same priority are
  3208. evaluated from left to right. All expressions allow the usage of parenthesis
  3209. to change the order of evaluation or to clarity the intended usage.
  3210.  
  3211.  
  3212. Numeric Operations
  3213.  
  3214.     These operators provide the basic arithmetic functions. They operate
  3215. on integer values. If a value is a stirng or logical, it is converted into an
  3216. integer.
  3217.  
  3218.                 Number of
  3219.                   Operation    Values    Priority    Symbol
  3220.                   ------------------------------------------
  3221.         Unary Minus    1    8    -
  3222.         Unary Plus    1    8    +
  3223.         Multiply        2    6    *
  3224.         Divide        2    6    / or %
  3225.         Modulo        2    6    MOD or //
  3226.         Addition        2    5    +
  3227.         Subtract        2    5    -
  3228.  
  3229.  
  3230. Unary Operators
  3231.  
  3232.     As in algabra, + and - can be used to indicate positive or negative
  3233. numbers. A unary operator can precede a single value. The value can be a
  3234. constant, a variable or an expression within parentheses. Unary operators have
  3235. the highest priority.
  3236.  
  3237.     Examples:
  3238.         -8    +56    -Count    -( x + y )
  3239.  
  3240. Multiply, Divide, Modulo, Add, and Subtract Operators
  3241.  
  3242.     These operations perform the basic algebaric operations. The modulo
  3243. operation operation returns the remainder of an integer divide. Both the
  3244. symbol // or the word MOD can be used.
  3245.  
  3246.  
  3247.     Expression    Result
  3248.     ------------------------
  3249.     4 + 7 - 2    9
  3250.     5 + 3 * 2    11
  3251.     -8 - 6 / 2    -11
  3252.     +6 - 11 MOD 3    4
  3253.     +6 -11 // 3    4
  3254.  
  3255. NOTE: Currently you can use either / or % for Division. Future releases will
  3256. use / for Floating Point Division and % for Interger Division. Your current
  3257. scripts will be fully compatable with future versions if you use the %
  3258. operator.
  3259.  
  3260.                                      6-6
  3261.  
  3262. String to Integer Conversion
  3263.  
  3264.     If the first characters within the string represents an integer, the
  3265. automatic conversion will recognize the value. Otherwise, an integer value of
  3266. ZERO will be used.
  3267.  
  3268.     Sting        Result
  3269.     ------------------------
  3270.     "104"        104
  3271.     "14 Times"    14
  3272.     "Five"        0
  3273.     "-86"        -86
  3274.     " -5 "        0
  3275.     "Jacks"        0
  3276.  
  3277.  
  3278. Logical to Integer Conversion
  3279.  
  3280.     Logicals are either TRUE or FALSE. TRUE convertes to 1. FALSE
  3281. converts to 0.
  3282.  
  3283.     Logical        Result
  3284.     ------------------------
  3285.     TRUE        1
  3286.     FALSE        0
  3287.     ON        1
  3288.     OFF        0
  3289.     YES        1
  3290.     NO        0
  3291.     ( 5 = 6 )    0
  3292.     ( 5 <= 6 )    1
  3293.  
  3294.  
  3295. Sting Concatenation Operations
  3296.  
  3297.     The string concatenation operators append two strings together. The
  3298. concatenate including space operator (|||) appends the two strings with a
  3299. space between them.
  3300.  
  3301.                     Number of
  3302.     Operation            Values    Priority    Symbol
  3303.     ------------------------------------------------------------
  3304.     Concatenate            2    4    ||
  3305.     Concatenate including Space    2    4    |||
  3306.  
  3307.     Expression        Result
  3308.     --------------------------------------
  3309.     "1234" || "5678"        "12345678"
  3310.     "1234" ||| "5678"        "1234 5678"
  3311.  
  3312.                                      6-7
  3313.  
  3314. Integer to String Conversion
  3315.  
  3316.     If the value for a string operation is an integer, it will be
  3317. converted to a string. The string equivalent will not contain leading speces
  3318. or zeros. If the integer is negative, it will contain leading minus sign
  3319. ("-").
  3320.  
  3321.     Expression            Result
  3322.     ------------------------------------------------------
  3323.     "Score:" || 250            "Score:250"
  3324.     "Ending Value:" ||| ( 15 - 25 )    "Ending Value:-10"
  3325.  
  3326.  
  3327. Logical to String
  3328.  
  3329.     If a logical value is used in a string operation, it will be
  3330. converted to eithe "TRUE" or "FALSE".
  3331.  
  3332.     Expression            Result
  3333.     ------------------------------------------------------
  3334.     "Value > 100:"||| ( Value > 100 )    "Value > 100: TRUE"
  3335.     TRUE ||| FALSE ||| YES ||| NO    "TRUE FALSE TRUE FALSE"
  3336.  
  3337.  
  3338. Relational
  3339.  
  3340.     Relational operators compare two values to each other. These
  3341. operations work with both integer and string values. The result of a
  3342. relational comparison is a logical value.
  3343.  
  3344.                 Number of
  3345.     Operation        Values    Priority    Symbol
  3346.     ----------------------------------------------------------
  3347.     LessThan            2    3    <
  3348.     GreaterThan        2    3    >
  3349.     LessThan or Equal        2    3    <=  =<
  3350.     GreaterThan or Equal    2    3    >=  =>
  3351.     NotEqual            2    3    < >  > <  ~ =
  3352.     Equal            2    3    =  = =  : =
  3353.  
  3354.     If both values are integers, they are compared in the usual way.
  3355. However, if either of the values are not integers, then both values are
  3356. converted to strings.
  3357.     The results of string comparisons are similar to the way a dictionary
  3358. is ordered. However, upper and lower case letters are not the same. The order
  3359. of the letters are based on the ASCII character set ( see ASCII appendix ).
  3360.  
  3361.     Expression        Result
  3362.     -----------------------------------------------------
  3363.     7 + 2 < 6        FALSE
  3364.     5 - 7 ==- ( 12 / 6 )    TRUE
  3365.     "Five" <> "FIVE"        TRUE
  3366.     "-15" = 5 * -3        TRUE ( string comparison )
  3367.  
  3368.                                      6-8
  3369.  
  3370. Boolean Operations
  3371.  
  3372.     Boolean operations work with logical values. Often they are used with
  3373. the results from relational comparisons.
  3374.  
  3375.             Number of
  3376.     Operation    Values    Priority    Symbol
  3377.     ------------------------------------------
  3378.     NOT        1    8    NOT  ~
  3379.     And        2    2    AND  &
  3380.     Or        2    1    OR   |
  3381.     Xor        2    1    XOR &&
  3382.  
  3383.     The OR operation is used to determine if either of two conditions is
  3384. TRUE. The AND operation determines if BOTH conditons are TRUE. The XOR is used
  3385. to ascertain when one of the values is TRUE but not BOTH.
  3386.     The NOT operation is similar to the unary minus. The unary minus
  3387. changes the sign of a value. The NOT operation changes a TRUE value to FALSE,
  3388. and a FALSE value to TRUE.
  3389.  
  3390.     Expression        IntermediateResult    Result
  3391.     ------------------------------------------------------------------
  3392.     3 <> 4 or 5 = 6        TRUE or FALSE        TRUE
  3393.     5 = 3 + 2 and 7 < 2    TRUE and FALSE        FALSE
  3394.     3 <= 7 and -5 >= -8    TRUE and TRUE        TRUE
  3395.     not (5 = 5 and 6 <> 7 )    NOT ( TRUE )        FALSE
  3396.  
  3397.  
  3398. Integer to Logical Conversion
  3399.  
  3400.     When the value for a logical operation is an integer, it will be
  3401. converted to FALSE if the value is ZERO. Othewise, it is converted to TRUE.
  3402.  
  3403.     Expression    Result
  3404.     ------------------------
  3405.     0 or 1        TRUE
  3406.     1 and 5        TRUE
  3407.     NOT 5        FALSE
  3408.  
  3409.  
  3410. String to Logical Conversion
  3411.  
  3412.     If the value for a logical operation is a string, it is converted to
  3413. a TRUE when the STRING is "TRUE","ON", or "YES". The identification is only on
  3414. the leading characters of the string. If the leading characters do not match,
  3415. it is converted to FALSE.
  3416.  
  3417.     Expression    Result
  3418.     -------------------------------------------------------
  3419.     "TRUE" or "FALSE"    TRUE
  3420.     "TRUE" and "ON"    TRUE
  3421.     "TRUE" and " ON"    FALSE
  3422.     "TRUE" and "ONCE"    TRUE ( "ON" is identified in "ONCE" )
  3423.  
  3424.                                      6-9
  3425.  
  3426.                                   Functions
  3427.  
  3428.     A function is an operation, which returns a single value, that can be
  3429. used within an expression.
  3430.     Some functions do not require parameters. These functions are called
  3431. System Variables. This is because their usage resembles that of variables.
  3432. MouseX is an example of a System Variable. It can be used in any expression
  3433. just as though is was a variable. However, it is a read-only variable. This
  3434. means you can not use the LET Command to change its value. It is always equal
  3435. to the "current" value of the horizontal position of the mouse pointer.
  3436.  
  3437.     Other functions require information, on the form of parameters, on
  3438. order to perform its operation. A function can have one or more parameters,
  3439. contained with parenthesis, and separated by commas.
  3440.  
  3441. LET X = MAX { OldX , Y / " , 100 }
  3442.  
  3443.     This assignment demonstrates the Max Function. The parameter list for
  3444. the function is contained within parenthesis. Each parameter is an expression.
  3445. This means it can contain constants, variables, operatiors, and even other
  3446. functions. Multiple parameters are separated by commas.
  3447.     As with operators, the parameters for functions have expected data
  3448. types. The parameter is automatically converted to the required type.
  3449.     The function returns a single result. This way, the function cn be
  3450. placed in an expression just as a variable or constant.
  3451.  
  3452.  
  3453. Conversion Functions
  3454.  
  3455.     Within expressions, values are automatically converted to the type of
  3456. data neeeded for an operation. However, the data type of the result is
  3457. detemined by last operation performed.
  3458.  
  3459.     <integer> = Integer { expression }
  3460.     "string"  = String  { expression }
  3461.     «logical» = Logical { expression }
  3462.  
  3463. Example:
  3464.     LET Count = "123" || "456"
  3465.  
  3466.     The variable Count is assigned the string value of "123456". Count
  3467. could be successfully used in arithmetic operations. However, each time it is
  3468. used it is converted ino an integer. If Count is primarily used as an integer,
  3469. it would be more efficient to convert the value when it is assigned.
  3470.  
  3471. LET Count = Integer { "123" || "456" }
  3472.  
  3473.     The Integer Function converts the value within the parenthesis into
  3474. an intege. Likewise, the String and Logical Funcions convert values into
  3475. strings and logicals.
  3476.  
  3477.                                      6-10
  3478.  
  3479. Integer Functions
  3480.  
  3481.     The following functions allow you to work with in integer values.
  3482.  
  3483. ABSOLUTE        <integer> = ABSOLUTE ( <value> )
  3484.  
  3485.     The Absolute Function returns the absolute value of an integer. If
  3486. the value is positive or ZERO, ABSOLUTE returns the same value. If the value
  3487. is negative, it returns the positive value.
  3488.  
  3489.     Expression    Result
  3490.     ------------------------
  3491.     ABSOLUTE (156)    156
  3492.     ABSOLUTE (-66)     66
  3493.     ABSOLUTE (0)      0
  3494.  
  3495. LIMIT        <integer> = LIMIT ( <limit1> , <limit2> , <test value> )
  3496.  
  3497.     The Limit Function returns a value within a specified range. The
  3498. first two values, <limit1> and <limit2> indicate the minimun and maximum
  3499. values in the range. The thrid parameter is the value to test. If this value
  3500. is between the two limits, the Limit Function returns the value unchanged. If
  3501. it is less than the low limit, it returns the low limit value. If it is
  3502. greater then the high limit, it returns the high limit value.
  3503.  
  3504.     Expression        Result
  3505.     ---------------------------------
  3506.     LIMIT (0,100,89)          89
  3507.     LIMIT (-300,-100,45)    -100
  3508.     LIMIT (900,400,0)         400
  3509.  
  3510. MAX        <intege> = MAX ( <value> { , <value> , ...} )
  3511.  
  3512.     The Max Funtion returns the value of the highest parameter. The Max
  3513. Function can have one or more parameters.
  3514.  
  3515.     Expression        Result
  3516.     ---------------------------------
  3517.     MAX (6,-1000,66,-5)     66
  3518.     MAX (-10,-5)        - 5
  3519.     MAX (6-5,7*3,-1)         21
  3520.  
  3521. MIN        <integer> = MIN ( <value> { , <value> , ...} )
  3522.  
  3523.     The Min Function returns the value of the lowest parameter. The Min
  3524. Function can have one or more parameters.
  3525.  
  3526.     Expression        Result
  3527.     ---------------------------------
  3528.     MIN (100,5000,200)     100
  3529.     MIN (-5*6,-1)        - 30
  3530.     MIN (5,7,-3,10,-5,88,8)    -  5
  3531.  
  3532.                                      6-11
  3533.  
  3534. RANDOM        <integer> = RANDOM ( <minimum> , <maximum> )
  3535.  
  3536.     The Random Function returns a random integer between and including
  3537. the <minimum> and <maximum> values.
  3538.  
  3539.     Expression    Result
  3540.     ---------------------------------------------
  3541.     RANDOM (5,20)    any value between 5 and 20.
  3542.  
  3543. SIGN        <integer> = SIGN ( <value> )
  3544.  
  3545.     The Sign Function returns the sign of the value. If the value is
  3546. positive, it returns 1. If the value is ZERO (0), it returns 0, Otherwise, it
  3547. returns -1.
  3548.  
  3549.  
  3550. String Functions
  3551.  
  3552.     The string frunctions allow you to manupulate and work with strings.
  3553.  
  3554. ASCII        <integer> = ASCII ( "string" )
  3555.  
  3556.     The ASCII Function returns the ASCII value of the first cahracter in
  3557. the supplied string. The ASCII value is a positive integer between o and 255.
  3558.  
  3559.     Expression    Result
  3560.     ------------------------
  3561.     ASCII ( "A" )     65
  3562.     ASCII ( "m" )    109
  3563.     ASCII ( "more" )    109
  3564.     ASCII ( "<" )     60
  3565.  
  3566. CHAR        "string" = CHAR ( <integer> )
  3567.  
  3568.     The Char Function returns a single character string cooresponding to
  3569. an ASCII intege. The ASCII values range from 0 to 255.
  3570.  
  3571.  
  3572.     Expression    Result
  3573.     ------------------------
  3574.     CHAR (65)    "A"
  3575.     CHAR (109)    "m"
  3576.     CHAR (60)    "<"
  3577.  
  3578.                                      6-12
  3579.  
  3580. NUNBEROFCHARS    <integer> = NUMBEROFCHARS ( "string" )
  3581.  
  3582.     The NumberOfChars takes a string parameter, and returns the number of
  3583. characters.
  3584.  
  3585.     Expression                Result
  3586.     ---------------------------------------------------
  3587.     NumberOfChars ( "Hello!" )             6
  3588.     NumberOfChars ( "Spanish Inquisition" )    20
  3589.     NumberOfChars ( -67 )             3
  3590.  
  3591. LOWERCASE    "string" = LOWERCASE ( "string" )
  3592.  
  3593.     The LowerCase Function converts uppercase characters within a string
  3594. to lowercase. All other characters remain unchanged.
  3595.  
  3596.     Expression            Result
  3597.     --------------------------------------------------
  3598.     LOWERCASE ( "ABCdef123#$%" )    "abcdef123#$%"
  3599.  
  3600. UPPERCASE    "string" = UPPERCASE ( "string" )
  3601.  
  3602.     The UpperCase Function converts lowercase characters within a string
  3603. to uppercase. All other characters remain unchanged.
  3604.  
  3605. DUPESTRING        "string" = DUPESTRING ( "string" , <count> )
  3606.  
  3607.     The DupeString duplicates a string a specified nymber of times. It
  3608. returns a single string.
  3609.  
  3610.     Expression        Result
  3611.     --------------------------------------------------
  3612.     DUPESTRING ("*",10)    "**********"
  3613.     DUPESTRING ("-",6)    "------"
  3614.     DUPESTRING ("Hello! ",3)    "Hello! Hello! Hello! "
  3615.  
  3616. TRIMSTRING        "string" = TRIMSTRING ( "string" )
  3617.  
  3618.     The TrimString Function removes leading and trailing spaces and TAB
  3619. characters within the remaining string are replaced with a single space.
  3620.  
  3621.     Expression            Result
  3622.     ----------------------------------------------------
  3623.     TRIMSTRING (" This is a  Test")    "This is a Test"
  3624.     TRIMSTRING ("Hello Out there!  ")    "Hello Out there!"
  3625.  
  3626.                                      6-13
  3627.  
  3628. INSERTCHARS    "string" = INSERTCHARS ( "source","destination",<offset> )
  3629.  
  3630.     The InsertChars Function inserts a source string into the distination
  3631. string at the specified offset. If the offset is greater than the length of
  3632. the destination string, the source string is appended to the end of the
  3633. destination.
  3634.  
  3635.     Expression            Result
  3636.     -----------------------------------------------
  3637.     INSERTCHARS ("...","123456",4)    "1234...56"
  3638.  
  3639. REMOVECHARS    "string"=REMOVECHARS ( "source",<starting offset>,<length> )
  3640.  
  3641.  
  3642.     The RemoveChars Function returns a string with specified characters
  3643. removed. The first parameter is the source string from which to remove the
  3644. characters. The second parameter specifies the starting offset of the
  3645. characters to be removed. The last parameter indicates the number of
  3646. characters to remove.
  3647.  
  3648.     Expression            Result
  3649.     ------------------------------------------
  3650.     REMOVECHARS ("12345",3,2)        "125"
  3651.     REMOVECHARS ("Hello!",5,1)        "Hell!"
  3652.     REMOVECHARS ("Hello!",5,-1)    "Hello!"
  3653.  
  3654. FINDCHARS    <integer> = FINDCHARS ( "source","search",<starting offset> )
  3655.  
  3656.     The FindChars Function searches the contents of a source string for a
  3657. matching string.
  3658. The <starting offset> indicates the offset within the "source" string to begin
  3659. the search. The "search" string must match identically. If the string is
  3660. found, FindChars returns the offset within the "source" string of the first
  3661. character of the matching string. If the string is not found, FindChars
  3662. returns a ZERO (0).
  3663.  
  3664.     Expression            Result
  3665.     ------------------------------------------
  3666.     FINDCHARS ("Hello Bill!","Bill",1)    7
  3667.     FINDCHARS ("Hello Bill!","Fred",1)    0
  3668.     FINDCHARS ("This is it!","is",1)    3
  3669.     FINDCHARS ("This is it!","is",4)    5
  3670.  
  3671.                                      6-14
  3672.  
  3673. GETCHARS        "string" = GETCHARS ( "source",<starting offset>,<length> )
  3674.  
  3675.     The GetChars Function returns a portion of a string. The <starting
  3676. offset> indicates the starting character of the substring. The <length>
  3677. indicates the number of characters to include.
  3678.  
  3679.     Expression            Result
  3680.     ------------------------------------------
  3681.     GETCHARS ("Brainpower",2,4)    "rain"
  3682.     GETCHARS ("Hello!",4,10)        "lo!"
  3683.     GETCHARS ("Jim Finney",20,1)    ""
  3684.  
  3685. FINDWORD        <integer> = FINDWORD ("source","search word"
  3686.                {,<startwordnumber> {,"worddelimiters"}})
  3687.  
  3688.     The FindWord searches a "source" string for a matching "search word"
  3689. and returns its word number. If the word is not found, it will return a ZERO
  3690. (0). The optional <StartWordNumber> allows you to specify a starting word
  3691. number to begin the search. If it is not specified, it defaults to 1. The
  3692. "WordDeflimiters" can contain characters indicating the characters that
  3693. separate word.
  3694.  
  3695.     Expression                    Result
  3696.     ------------------------------------------------------------
  3697.     FINDWORD ("This is a sample sentence.","sample")    4
  3698.  
  3699. GETWORD        "string" = GETWORD ("source",<wordnumber>
  3700.               {,"worddelimiters"})
  3701.  
  3702.     The GetWord Function returns a specified word nymber from the
  3703. "source" string. The <wordnumber> indicates which word to return. A
  3704. <wordnumber> of 1 returns the first word. A 2 returns the second word. By
  3705. default, words are separated by spaecs. You can supply a list of characters in
  3706. the optional parameter "worddelimiters".
  3707.  
  3708.  
  3709.  
  3710.     Expression                Result
  3711.     -----------------------------------------------------
  3712.     GETWORD ("The dog Smiled.",3)        "Smiled"
  3713.     GETWORD ("DF1:Sounds/Bird.snd",2,":/")    "Sounds"
  3714.  
  3715.                                      6-15
  3716.  
  3717. POSITIONOFWORD    "string" = POSITONOFWORD ("source",<wordnumber>
  3718.               {,"worddelimiters"})
  3719.  
  3720.     The PositionOfWord Function returns the offset into the "source"
  3721. string for a specified word <wordnumber>. If the <wordnumber> is greater than
  3722. the number of words in the "source" string, PositionOfWord returns a ZERO (0).
  3723. The "worddelimiters" work in the same way as in GetWord allowing you to
  3724. specify the charcaters separating words.
  3725.  
  3726.     Expression                Result
  3727.     ---------------------------------------------------
  3728.     POSITONOFWORD ("Word1 Word2 Word3",2)    7
  3729.  
  3730. BUMPREVISION    "string" = BUMPREVISION ( "name" )
  3731.  
  3732.     The BumpRevision Function changes the revision of a "name" in the
  3733. same manner the Workbench Duplicate function does with a filename.
  3734.  
  3735.     Expression            Result
  3736.     ------------------------------------------
  3737.     BUMPREVISION ("Record")        "Copy of Record"
  3738.     BUMPREVISION ("Copy of Record")    "Copy 2 of Record"
  3739.     BUMPREVISION ("Copy 2 of Record")    "Copy 3 of Record"
  3740.  
  3741. EVALUATEEXPRESSION    results = EVALUATEEXPRESSION ( "string" )
  3742.  
  3743.     The EvaluateExpression Function evaluates the string parameter. The
  3744. string must contain a valid expression. EvaluateExpression returns the result
  3745. of the evaluation. If there is any uncertainty as to the validity of the
  3746. expression, a run time error can be avoided by using the VerifyExpression
  3747. Function.
  3748.     This function allows expressions to be created at run time. This can
  3749. be quite powerful. However, it is error prone and it can make the script
  3750. difficult to read.
  3751.  
  3752.     Expression            Result
  3753.     ------------------------------------------
  3754.     EVALUATEEXPRESSION ("5+6")         11
  3755.     EVALUATEEXPRESSION ("123" || "-23")    100
  3756.  
  3757.                                      6-16
  3758.  
  3759. VERIFYEXPRESSION        «logical» = VERIFYEXPRESSION ( "string" )
  3760.  
  3761.     The VerifyExpression Functon evaluates the string parameter. However,
  3762. it does not return the resulting value of the evaluation. It returns a TRUE if
  3763. the expression is successfully evaluated. Otherwise, it returns a FALSE. This
  3764. function also allows an expression to be verified before using the
  3765. EvaluteExpression.
  3766.  
  3767.     Expression        Result
  3768.     ---------------------------------
  3769.     VERIFYEXPRESSION ("5+6")    TRUE
  3770.     VERIFYEXPRESSION ("6+*7)    FALSE
  3771.     VERIFYEXPRESSION ("(5+6")    FALSE
  3772.  
  3773.